Skip to content
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

UINavigationController bug #16

Open
mitchellporter opened this issue Mar 9, 2016 · 1 comment
Open

UINavigationController bug #16

mitchellporter opened this issue Mar 9, 2016 · 1 comment

Comments

@mitchellporter
Copy link

I'm using a UINavigationController and triggering a modal segue to another view controller. The transition uses the top edge.

There is a bug that happens sometimes where when I go to perform the segue, the navigation controller's view will flicker and jump up behind the view that we are about to present.

I can't say for sure, but I have a feeling that this could be avoided by not altering the navigation controller's view at all, and instead using a snapshot view. I created an interactive transition from scratch earlier today and have been able to avoid this issue completely by creating a snapshot view with UIApplication.sharedApplication().delegate?.window!!.snapshotViewAfterScreenUpdates(false)

I take a snapshot of the window to capture the nav bar, set the actual nav controller view to hidden, animate the snapshot view during the transition, and when the transition animation is done I unhide the real navigation controller view.

Unfortunately I don't have time to fully test this and submit a PR right now but hopefully this might help anyone else who comes across this problem.

@mitchellporter
Copy link
Author

I can't say for sure if this would fix this issue with this library, because I did this in my own custom transition after removing this library, but what I'm doing now is taking a snapshot view of the screen (including nav bar), and animating that instead of animating the nav controller's actual view.

If anyone else runs into this problem I would definitely try the snapshot method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant