Commit 0131c129 by Daniel Dahan

stability updates

parent 1166d3c2
Pod::Spec.new do |s| Pod::Spec.new do |s|
s.name = 'Motion' s.name = 'Motion'
s.version = '1.0.5' s.version = '1.0.6'
s.license = 'BSD-3-Clause' s.license = 'BSD-3-Clause'
s.summary = 'Seamless animations and transitions in Swift.' s.summary = 'Seamless animations and transitions in Swift.'
s.homepage = 'http://cosmicmind.com' s.homepage = 'http://cosmicmind.com'
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>FMWK</string> <string>FMWK</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>1.0.5</string> <string>1.0.6</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string> <string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key> <key>NSPrincipalClass</key>
......
...@@ -182,7 +182,7 @@ extension UIViewController { ...@@ -182,7 +182,7 @@ extension UIViewController {
- Returns: An optional UIViewControllerAnimatedTransitioning. - Returns: An optional UIViewControllerAnimatedTransitioning.
*/ */
open func animationController(forDismissed dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? { open func animationController(forDismissed dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? {
return isMotionEnabled ? Motion() : nil return isMotionEnabled ? Motion(isPresenting: false, isContainer: false) : nil
} }
/** /**
...@@ -303,8 +303,7 @@ open class MotionPresentationController: UIPresentationController { ...@@ -303,8 +303,7 @@ open class MotionPresentationController: UIPresentationController {
presentedViewController.transitionCoordinator?.animate(alongsideTransition: { (context) in }) presentedViewController.transitionCoordinator?.animate(alongsideTransition: { (context) in })
} }
open override func presentationTransitionDidEnd(_ completed: Bool) { open override func presentationTransitionDidEnd(_ completed: Bool) {}
}
open override func dismissalTransitionWillBegin() { open override func dismissalTransitionWillBegin() {
guard nil != containerView else { guard nil != containerView else {
...@@ -314,8 +313,7 @@ open class MotionPresentationController: UIPresentationController { ...@@ -314,8 +313,7 @@ open class MotionPresentationController: UIPresentationController {
presentedViewController.transitionCoordinator?.animate(alongsideTransition: { (context) in }) presentedViewController.transitionCoordinator?.animate(alongsideTransition: { (context) in })
} }
open override func dismissalTransitionDidEnd(_ completed: Bool) { open override func dismissalTransitionDidEnd(_ completed: Bool) {}
}
open override var frameOfPresentedViewInContainerView: CGRect { open override var frameOfPresentedViewInContainerView: CGRect {
return containerView?.bounds ?? .zero return containerView?.bounds ?? .zero
...@@ -380,7 +378,7 @@ open class Motion: NSObject { ...@@ -380,7 +378,7 @@ open class Motion: NSObject {
/// The view that is being transitioned to. /// The view that is being transitioned to.
open var toView: UIView { open var toView: UIView {
return transitionContext.view(forKey: .to)! return toViewController.view
} }
/// The subviews of the view being transitioned to. /// The subviews of the view being transitioned to.
...@@ -390,7 +388,7 @@ open class Motion: NSObject { ...@@ -390,7 +388,7 @@ open class Motion: NSObject {
/// The view that is being transitioned from. /// The view that is being transitioned from.
open var fromView: UIView { open var fromView: UIView {
return transitionContext.view(forKey: .from)! return fromViewController.view
} }
/// The subviews of the view being transitioned from. /// The subviews of the view being transitioned from.
...@@ -585,6 +583,7 @@ extension Motion { ...@@ -585,6 +583,7 @@ extension Motion {
toView.isHidden = isPresenting toView.isHidden = isPresenting
containerView.insertSubview(toView, belowSubview: transitionView) containerView.insertSubview(toView, belowSubview: transitionView)
toView.frame = fromView.frame
toView.updateConstraints() toView.updateConstraints()
toView.setNeedsLayout() toView.setNeedsLayout()
toView.layoutIfNeeded() toView.layoutIfNeeded()
......
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