Skip to content

Commit

Permalink
Patching Crash
Browse files Browse the repository at this point in the history
Fixed how fromValue is being cast
  • Loading branch information
dpopov committed Nov 7, 2016
1 parent 178f5c7 commit 3be7b6b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Sources/Managers/M13CheckboxSpiralController.swift
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@ internal class M13CheckboxSpiralController: M13CheckboxController {
markLayer.add(checkQuickOpacityAnimation, forKey: "opacity")
selectedBoxLayer.add(boxStrokeAnimation, forKey: "strokeEnd")

markLayer.strokeEnd = checkStrokeAnimation.fromValue as! CGFloat
markLayer.opacity = checkQuickOpacityAnimation.fromValue as! Float
selectedBoxLayer.strokeEnd = boxStrokeAnimation.fromValue as! CGFloat
markLayer.strokeEnd = CGFloat((checkStrokeAnimation.fromValue as! NSNumber).floatValue)
markLayer.opacity = (checkQuickOpacityAnimation.fromValue as! NSNumber).floatValue
selectedBoxLayer.strokeEnd = CGFloat((checkStrokeAnimation.fromValue as! NSNumber).floatValue)

CATransaction.commit()
} else if pathGenerator.pathForMark(toState) != nil && pathGenerator.pathForMark(fromState) == nil {
Expand Down Expand Up @@ -180,9 +180,9 @@ internal class M13CheckboxSpiralController: M13CheckboxController {
markLayer.add(checkQuickOpacityAnimation, forKey: "opacity")
markLayer.add(checkStrokeAnimation, forKey: "strokeEnd")
markLayer.add(checkMorphAnimation, forKey: "path")
markLayer.opacity = checkQuickOpacityAnimation.fromValue as! Float
markLayer.strokeEnd = checkStrokeAnimation.fromValue as! CGFloat

markLayer.strokeEnd = CGFloat((checkStrokeAnimation.fromValue as! NSNumber).floatValue)
markLayer.opacity = (checkQuickOpacityAnimation.fromValue as! NSNumber).floatValue
markLayer.path = pathGenerator.pathForLongMark(toState)?.reversing().cgPath

CATransaction.commit()
Expand Down

0 comments on commit 3be7b6b

Please sign in to comment.