1
1
# Shift
2
- A library of custom iOS View Controller Animations and Interactions written in Swift.
2
+ [ ![ Carthage compatible] ( https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat )] ( https://github.com/Carthage/Carthage )
3
+ [ ![ CocoaPods compatible] ( https://img.shields.io/cocoapods/v/Shift.svg )] ( https://github.com/CocoaPods/CocoaPods )
3
4
4
- [ ![ Carthage compatible ] ( https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat )] ( https://github.com/raizlabs/shift )
5
+ A library of custom iOS View Controller Animations and Interactions written in Swift.
5
6
6
7
## Installation with Carthage
7
8
@@ -43,7 +44,7 @@ navigationController?.delegate = self
43
44
44
45
``` swift
45
46
var currentTransition: UIViewControllerAnimatedTransitioning?
46
- ```
47
+ ```
47
48
48
49
- Extend your view controller to implement ` UINavigationControllerDelegateTransitioning ` . In your implementation, make sure to set the ` currentTransition ` :
49
50
@@ -56,9 +57,9 @@ extension ViewController: UINavigationControllerDelegate {
56
57
toViewController toVC : UIViewController) -> UIViewControllerAnimatedTransitioning? {
57
58
58
59
if (operation == .Push && fromVC == self ) {
59
- /*
60
- * set currentTransition here
61
- */
60
+ /*
61
+ * set currentTransition here
62
+ */
62
63
}
63
64
else if (operation == .Pop && toVC == self ) {
64
65
}
@@ -77,7 +78,7 @@ extension ViewController: UINavigationControllerDelegate {
77
78
<br />
78
79
</p >
79
80
80
- ` SplitTransition ` exposes 5 key properties:
81
+ ` SplitTransition ` exposes 5 key properties:
81
82
82
83
1 . ` screenshotScope ` - (optional, defaults to ` .View ` ) - determines whether top and bottom views are sourced from container view or entire window
83
84
2 . ` splitLocation ` (optional, defaults to ` 0.0 ` ) - y coordinate where the top and bottom views part
@@ -134,7 +135,7 @@ presentViewController(destinationViewController, animated: true) { [weak self] (
134
135
debugPrint (" SplitTransitionAnimatedPresentDismissViewControllerViewController has been deallocated" )
135
136
return
136
137
}
137
-
138
+
138
139
// After presentation has finished, update transitionType on currentTransition
139
140
vc.currentTransition ? .transitionType = .Dismissal (presentedVC, vc)
140
141
}
@@ -148,7 +149,7 @@ presentViewController(destinationViewController, animated: true) { [weak self] (
148
149
<br />
149
150
</p >
150
151
151
- ` ZoomPushTransition ` exposes 2 key properties:
152
+ ` ZoomPushTransition ` exposes 2 key properties:
152
153
153
154
1 . ` transitionTime ` - duration (in seconds) of the transition
154
155
2 . ` scaleChangePct ` - a transform which scales the destination view controller's view by `(sx, sy)' at the start of the transition
0 commit comments