clear the current completionBlock variable before calling it. fixes #31

This commit is contained in:
Kaan Dedeoglu
2016-07-21 12:35:08 +03:00
parent 1d9ab519f1
commit 3c38489154
+2 -2
View File
@@ -310,11 +310,11 @@ public class KDCircularProgress: UIView {
override public func animationDidStop(anim: CAAnimation, finished flag: Bool) {
if let completionBlock = animationCompletionBlock {
completionBlock(flag)
if flag {
animationCompletionBlock = nil
}
completionBlock(flag)
}
}