Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import UIKit
- extension CALayer {
- /// Resolve animation duration of the first animation using animation keys.
- var resolveAnimationDuration: CFTimeInterval? {
- if let firstKey = animationKeys()?.first,
- let animation = animation(forKey: firstKey) {
- return animation.duration
- }
- return nil
- }
- }
Add Comment
Please, Sign In to add comment