Open JustinDMoore opened 9 years ago
?
config.tapBlock = { progressView in dispatch_async(dispatch_get_main_queue()) { [unowned self] in KVNProgress.dismiss() } self.goBack() }
Hello @JustinDMoore, this seems correct. The swift code is only missing your
KVNProgress.configuration.tapBlock = nil;
Which would simply be
KVNProgress.configuration.tapBlock = nil
I am converting my existing project to Swift and just came across a small hiccup
Previously, I assigned a tap block as such:
KVNProgressConfiguration config = [Configuration errorProgressConfig];
config.tapBlock = ^(KVNProgress progressView) { KVNProgress.configuration.tapBlock = nil; dispatch_async(dispatch_get_main_queue(), ^{ [KVNProgress dismiss]; }); [self goBack]; };
Everything else with KVNProgress has worked effortlessly with Swift, but how can I translate this to Swift and assign the tap block? Not quite sure how to use a Closure to do this.