@@ -40,23 +40,28 @@ public extension UIView {
40
40
- Returns: A promise that fulfills with a boolean NSNumber indicating
41
41
whether or not the animations actually finished.
42
42
*/
43
+ @discardableResult
43
44
static func animate( _: PMKNamespacer , duration: TimeInterval , delay: TimeInterval = 0 , options: UIViewAnimationOptions = [ ] , animations: @escaping ( ) -> Void ) -> Guarantee < Bool > {
44
45
return Guarantee { animate ( withDuration: duration, delay: delay, options: options, animations: animations, completion: $0) }
45
46
}
46
47
48
+ @discardableResult
47
49
static func animate( _: PMKNamespacer , duration: TimeInterval , delay: TimeInterval , usingSpringWithDamping damping: CGFloat , initialSpringVelocity: CGFloat , options: UIViewAnimationOptions = [ ] , animations: @escaping ( ) -> Void ) -> Guarantee < Bool > {
48
50
return Guarantee { animate ( withDuration: duration, delay: delay, usingSpringWithDamping: damping, initialSpringVelocity: initialSpringVelocity, options: options, animations: animations, completion: $0) }
49
51
}
50
52
53
+ @discardableResult
51
54
static func transition( _: PMKNamespacer , with view: UIView , duration: TimeInterval , options: UIViewAnimationOptions = [ ] , animations: ( ( ) -> Void ) ? ) -> Guarantee < Bool > {
52
55
return Guarantee { transition ( with: view, duration: duration, options: options, animations: animations, completion: $0) }
53
56
}
54
57
58
+ @discardableResult
55
59
static func transition( _: PMKNamespacer , from: UIView , to: UIView , duration: TimeInterval , options: UIViewAnimationOptions = [ ] ) -> Guarantee < Bool > {
56
60
return Guarantee { transition ( from: from, to: to, duration: duration, options: options, completion: $0) }
57
- }
58
-
59
- static func perform( _: PMKNamespacer , animation: UISystemAnimation , on views: [ UIView ] , options: UIViewAnimationOptions = [ ] , animations: ( ( ) -> Void ) ? ) -> Guarantee < Bool > {
60
- return Guarantee { perform ( animation, on: views, options: options, animations: animations, completion: $0) }
61
+ }
62
+
63
+ @discardableResult
64
+ static func perform( _: PMKNamespacer , animation: UISystemAnimation , on views: [ UIView ] , options: UIViewAnimationOptions = [ ] , animations: ( ( ) -> Void ) ? ) -> Guarantee < Bool > {
65
+ return Guarantee { perform ( animation, on: views, options: options, animations: animations, completion: $0) }
61
66
}
62
67
}
0 commit comments