dragosaur
dragosaur

Reputation: 838

UINavigationController native-looking push interactive transition

When using UINavigationController in iOS7, you can interactively swipe from the left edge back to the previous view controller. How can I add an identical swipe from the right edge to push a view controller, like Mobile Safari does?

Upvotes: 0

Views: 207

Answers (1)

Léo Natan
Léo Natan

Reputation: 57040

Use a UIScreenEdgePanGestureRecognizer with right edge as allowed edges. When the gesture is detected, use an interactive percent-driven push to create the same effect. If you wish to create something more advanced, you can also add a shadow view and make its alpha dependent on the percent of completion.

Upvotes: 1

Related Questions