File tree Expand file tree Collapse file tree 1 file changed +8
-13
lines changed Expand file tree Collapse file tree 1 file changed +8
-13
lines changed Original file line number Diff line number Diff line change @@ -431,20 +431,15 @@ public class Spring : NSObject {
431431 }
432432
433433 func getAnimationOptions( curve: String ) -> UIViewAnimationOptions {
434- switch curve {
435- case " easeIn " :
436- return UIViewAnimationOptions . CurveEaseIn
437- case " easeOut " :
438- return UIViewAnimationOptions . CurveEaseOut
439- case " easeInOut " :
440- return UIViewAnimationOptions . CurveEaseInOut
441- case " linear " :
442- return UIViewAnimationOptions . CurveLinear
443- case " spring " :
444- return UIViewAnimationOptions . CurveLinear
445- default :
446- return UIViewAnimationOptions . CurveLinear
434+ if let curve = AnimationCurve ( rawValue: curve) {
435+ switch curve {
436+ case . EaseIn: return UIViewAnimationOptions . CurveEaseIn
437+ case . EaseOut: return UIViewAnimationOptions . CurveEaseOut
438+ case . EaseInOut: return UIViewAnimationOptions . CurveEaseInOut
439+ default : break
440+ }
447441 }
442+ return UIViewAnimationOptions . CurveLinear
448443 }
449444
450445 public func animate( ) {
You can’t perform that action at this time.
0 commit comments