New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Present modal with custom transition #1
Conversation
I was testing this on a real device, and there is a point when you dismiss the ImageViewer, and the entire UI stops receiving touches.With the Close Button action to dismiss, it works. When you flip to dismiss, the rest of the UI stops responding. |
Ok, so with the Close Button action to dismiss, it works. When you flip to dismiss, the rest of the UI stops responding. |
Ok sorry, forgot to adjust the swipe to dismiss code to handle VC being presented. Now fixed. |
It's working now. Do you think it would take a lot of work to use transitions for the dismiss? This way we would close the circle. |
@mluisbrown Btw, do you still need this code?
|
Shouldn't be too much work to use transitions for the dismiss too. Regarding that code block, it depends if you want to be maintain the ability to use |
I was thinking about adding an extension to a
The thing is, if you don't remove the
By removing the |
… Now only possible to display using `presentViewController`
@mluisbrown what's your feeling about the extension on an |
I think it's a great idea. |
2. Fix not removing NSNotification observer on swipe to dismiss 3. Added UIViewController extension method `presentImageViewer` as suggested by @RuiAAPeres 4. Made ImageViewer the `UIViewControllerTransitioningDelegate` (it decides which transition to use)
…pplicationWindow.windowLevel`
@@ -280,7 +285,7 @@ public final class ImageViewer: UIViewController, UIScrollViewDelegate { | |||
} | |||
} | |||
|
|||
private func showAnimation() { | |||
internal func showAnimation(duration: NSTimeInterval, completion: ((Bool) -> Void)?) { | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can remove internal
, it is by default.
…all status bar is horrible. Could not figure out a fix. Changing level of application window also doesn't resolve.
Made changes as per your suggestions. Status bar jump is fixed, but in-call status bar behaviour remains awful. I couldn't find a solution. Using |
Present modal with custom transition
Merge changes from original
Changed to make view controller presentable as modal VC using custom transition.
Only made a custom transition for the presentation, not the dismissal, where it's not necessary (uses the existing animation).