custom Pop animation for ConversationMessagePreviewNavigationControllerDelegate

This commit is contained in:
nixzhu
2015-05-25 15:38:51 +08:00
parent 2054313aab
commit e2ac3dd38a
@@ -21,7 +21,7 @@ class ConversationMessagePreviewNavigationControllerDelegate: NSObject, UINaviga
} else if operation == .Pop {
if toVC.isKindOfClass(ConversationViewController.self) {
isPresentation = false
return nil
return self
}
}
@@ -139,6 +139,12 @@ class ConversationMessagePreviewNavigationControllerDelegate: NSObject, UINaviga
let fromVC = transitionContext.viewControllerForKey(UITransitionContextFromViewControllerKey) as? MessageMediaViewController
let fromView = transitionContext.viewForKey(UITransitionContextFromViewKey)
let toView = transitionContext.viewForKey(UITransitionContextToViewKey)
let containerView = transitionContext.containerView()
containerView.addSubview(toView!)
containerView.addSubview(fromView!)
let animatingVC = fromVC!
let animatingView = fromView!