Skip to content

Instantly share code, notes, and snippets.

@mikezs
Created February 18, 2019 16:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikezs/7777ab873509995f8dd9a2464250e79f to your computer and use it in GitHub Desktop.
Save mikezs/7777ab873509995f8dd9a2464250e79f to your computer and use it in GitHub Desktop.
UIView.AnimationCurve to UIView.AnimationOptions
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