Created
February 18, 2019 16:40
-
-
Save mikezs/7777ab873509995f8dd9a2464250e79f to your computer and use it in GitHub Desktop.
UIView.AnimationCurve to UIView.AnimationOptions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension UIView.AnimationCurve { | |
var animationOption: UIView.AnimationOptions { | |
switch self { | |
case .easeInOut: | |
return .curveEaseInOut | |
case .easeIn: | |
return .curveEaseIn | |
case .easeOut: | |
return .curveEaseOut | |
case .linear: | |
return .curveLinear | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment