Skip to content

Commit 82f57a6

Browse files
committed
'Cancel' for PromiseKit -- provides the ability to cancel promises and promise chains
1 parent 7393458 commit 82f57a6

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

Cartfile.resolved

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
github "dougzilla32/PromiseKit" "288f7fbabc0b33c558bf908a3a0770693223d4e0"
1+
github "dougzilla32/PromiseKit" "087b3cf470890ff9ea841212e2f3e285fecf3988"

Sources/UIViewPropertyAnimator+Promise.swift

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,17 @@ import PromiseKit
44
import UIKit
55

66
@available(iOS 10, tvOS 10, *)
7-
public extension UIViewPropertyAnimator: CancellableTask {
7+
public extension UIViewPropertyAnimator {
88
func startAnimation(_: PMKNamespacer) -> Guarantee<UIViewAnimatingPosition> {
99
return Guarantee<UIViewAnimatingPosition>(cancellableTask: self) {
1010
addCompletion($0)
1111
startAnimation()
1212
}
1313
}
14-
14+
}
15+
16+
@available(iOS 10, tvOS 10, *)
17+
extension UIViewPropertyAnimator: CancellableTask {
1518
public func cancel() {
1619
stopAnimation(true)
1720
}

0 commit comments

Comments
 (0)