diff --git a/Sources/Managers/M13CheckboxBounceController.swift b/Sources/Managers/M13CheckboxBounceController.swift index 7c9e8d5..70fc838 100644 --- a/Sources/Managers/M13CheckboxBounceController.swift +++ b/Sources/Managers/M13CheckboxBounceController.swift @@ -171,8 +171,8 @@ internal class M13CheckboxBounceController: M13CheckboxController { let morphAnimation = animationGenerator.morphAnimation(fromPath, toPath: toPath) CATransaction.begin() - CATransaction.setCompletionBlock({ [unowned self] () -> Void in - self.resetLayersForState(self.state) + CATransaction.setCompletionBlock({ [weak self] () -> Void in + self?.resetLayersForState(self?.state) completion?() }) diff --git a/Sources/Managers/M13CheckboxDotController.swift b/Sources/Managers/M13CheckboxDotController.swift index 2e394e2..84d4c77 100644 --- a/Sources/Managers/M13CheckboxDotController.swift +++ b/Sources/Managers/M13CheckboxDotController.swift @@ -174,8 +174,8 @@ internal class M13CheckboxDotController: M13CheckboxController { let morphAnimation = animationGenerator.morphAnimation(fromPath, toPath: toPath) CATransaction.begin() - CATransaction.setCompletionBlock({ [unowned self] () -> Void in - self.resetLayersForState(self.state) + CATransaction.setCompletionBlock({ [weak self] () -> Void in + self?.resetLayersForState(self?.state) completion?() }) diff --git a/Sources/Managers/M13CheckboxExpandController.swift b/Sources/Managers/M13CheckboxExpandController.swift index fa7e36e..0c5f015 100644 --- a/Sources/Managers/M13CheckboxExpandController.swift +++ b/Sources/Managers/M13CheckboxExpandController.swift @@ -163,8 +163,8 @@ internal class M13CheckboxExpandController: M13CheckboxController { let morphAnimation = animationGenerator.morphAnimation(fromPath, toPath: toPath) CATransaction.begin() - CATransaction.setCompletionBlock({ [unowned self] () -> Void in - self.resetLayersForState(self.state) + CATransaction.setCompletionBlock({ [weak self] () -> Void in + self?.resetLayersForState(self?.state) completion?() }) diff --git a/Sources/Managers/M13CheckboxFadeController.swift b/Sources/Managers/M13CheckboxFadeController.swift index cbc0ed6..fa3b01b 100644 --- a/Sources/Managers/M13CheckboxFadeController.swift +++ b/Sources/Managers/M13CheckboxFadeController.swift @@ -163,8 +163,8 @@ internal class M13CheckboxFadeController: M13CheckboxController { let morphAnimation = animationGenerator.morphAnimation(fromPath, toPath: toPath) CATransaction.begin() - CATransaction.setCompletionBlock({ [unowned self] () -> Void in - self.resetLayersForState(self.state) + CATransaction.setCompletionBlock({ [weak self] () -> Void in + self?.resetLayersForState(self?.state) completion?() }) diff --git a/Sources/Managers/M13CheckboxFillController.swift b/Sources/Managers/M13CheckboxFillController.swift index 78fb15c..3d810ac 100644 --- a/Sources/Managers/M13CheckboxFillController.swift +++ b/Sources/Managers/M13CheckboxFillController.swift @@ -142,8 +142,8 @@ internal class M13CheckboxFillController: M13CheckboxController { let morphAnimation = animationGenerator.morphAnimation(fromPath, toPath: toPath) CATransaction.begin() - CATransaction.setCompletionBlock({ [unowned self] () -> Void in - self.resetLayersForState(self.state) + CATransaction.setCompletionBlock({ [weak self] () -> Void in + self?.resetLayersForState(self?.state) completion?() }) diff --git a/Sources/Managers/M13CheckboxFlatController.swift b/Sources/Managers/M13CheckboxFlatController.swift index d31456b..2714933 100644 --- a/Sources/Managers/M13CheckboxFlatController.swift +++ b/Sources/Managers/M13CheckboxFlatController.swift @@ -181,8 +181,8 @@ internal class M13CheckboxFlatController: M13CheckboxController { let morphAnimation = animationGenerator.morphAnimation(fromPath, toPath: toPath) CATransaction.begin() - CATransaction.setCompletionBlock({ [unowned self] () -> Void in - self.resetLayersForState(self.state) + CATransaction.setCompletionBlock({ [weak self] () -> Void in + self?.resetLayersForState(self?.state) completion?() }) diff --git a/Sources/Managers/M13CheckboxSpiralController.swift b/Sources/Managers/M13CheckboxSpiralController.swift index 7232e97..f06e9e8 100755 --- a/Sources/Managers/M13CheckboxSpiralController.swift +++ b/Sources/Managers/M13CheckboxSpiralController.swift @@ -193,8 +193,8 @@ internal class M13CheckboxSpiralController: M13CheckboxController { let morphAnimation = animationGenerator.morphAnimation(fromPath, toPath: toPath) CATransaction.begin() - CATransaction.setCompletionBlock({ [unowned self] () -> Void in - self.resetLayersForState(self.state) + CATransaction.setCompletionBlock({ [weak self] () -> Void in + self?.resetLayersForState(self?.state) completion?() }) diff --git a/Sources/Managers/M13CheckboxStrokeController.swift b/Sources/Managers/M13CheckboxStrokeController.swift index df04067..c9e465c 100644 --- a/Sources/Managers/M13CheckboxStrokeController.swift +++ b/Sources/Managers/M13CheckboxStrokeController.swift @@ -105,8 +105,8 @@ internal class M13CheckboxStrokeController: M13CheckboxController { let quickOpacityAnimation = animationGenerator.quickOpacityAnimation(true) CATransaction.begin() - CATransaction.setCompletionBlock({ [unowned self] () -> Void in - self.resetLayersForState(self.state) + CATransaction.setCompletionBlock({ [weak self] () -> Void in + self?.resetLayersForState(self?.state) completion?() }) @@ -141,8 +141,8 @@ internal class M13CheckboxStrokeController: M13CheckboxController { let morphAnimation = animationGenerator.morphAnimation(fromPath, toPath: toPath) CATransaction.begin() - CATransaction.setCompletionBlock({ [unowned self] () -> Void in - self.resetLayersForState(self.state) + CATransaction.setCompletionBlock({ [weak self] () -> Void in + self?.resetLayersForState(self?.state) completion?() })