Commit 83ab6b00 by Daniel Dahan

UIViewController.motionModalTransitionType renamed to UIViewController.motionTransitionType

parent b9a25764
## 1.2.5
* `UIViewController.motionModalTransitionType` renamed to `UIViewController.motionTransitionType`.
## 1.2.4
* Added begin / end transition methods for from / to view controllers.
......
......@@ -74,8 +74,8 @@ extension UIViewController {
}
}
/// default motion animation type for presenting & dismissing modally
public var motionModalTransitionType: MotionTransitionType {
/// Default motion animation type for presenting & dismissing modally.
public var motionTransitionType: MotionTransitionType {
get {
return associatedInstance.modalTransitionType
}
......@@ -84,7 +84,7 @@ extension UIViewController {
}
}
/// used for .overFullScreen presentation
/// Used for .overFullScreen presentation.
internal var motionStoredSnapshot: UIView? {
get {
return associatedInstance.storedSnapshot
......@@ -200,22 +200,30 @@ extension UIViewController {
/// Unwind to the root view controller using Motion.
@IBAction
public func motionUnwindToRootViewController() {
motionUnwindToViewController { $0.presentingViewController == nil }
motionUnwindToViewController {
nil == $0.presentingViewController
}
}
/// Unwind to a specific view controller using Motion.
public func motionUnwindToViewController(_ toViewController: UIViewController) {
motionUnwindToViewController { $0 == toViewController }
motionUnwindToViewController {
$0 == toViewController
}
}
/// Unwind to a view controller that responds to the given selector using Motion.
public func motionUnwindToViewController(withSelector: Selector) {
motionUnwindToViewController { $0.responds(to: withSelector) }
motionUnwindToViewController {
$0.responds(to: withSelector)
}
}
/// Unwind to a view controller with given class using Motion
public func motionUnwindToViewController(withClass: AnyClass) {
motionUnwindToViewController { $0.isKind(of: withClass) }
motionUnwindToViewController {
$0.isKind(of: withClass)
}
}
/// Unwind to a view controller that the matchBlock returns true on.
......
......@@ -222,7 +222,7 @@ class TransitionPreprocessor: MotionPreprocessor {
} else if isTabBarController, let tabAnim = toViewController?.tabBarController?.motionTabBarTransitionType {
defaultAnimation = tabAnim
} else if let modalAnim = (isPresenting ? toViewController : fromViewController)?.motionModalTransitionType {
} else if let modalAnim = (isPresenting ? toViewController : fromViewController)?.motionTransitionType {
defaultAnimation = modalAnim
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment