Guest User

Untitled

a guest
Feb 25th, 2018
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. import UIKit
  2.  
  3. extension CALayer {
  4. /// Resolve animation duration of the first animation using animation keys.
  5. var resolveAnimationDuration: CFTimeInterval? {
  6. if let firstKey = animationKeys()?.first,
  7. let animation = animation(forKey: firstKey) {
  8. return animation.duration
  9. }
  10.  
  11. return nil
  12. }
  13. }
Add Comment
Please, Sign In to add comment