Skip to content
Push/pop transition entire UINavigationController views.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Basic Example
Bad.gif
Good.gif
LICENSE
README.markdown
TRVSNavigationControllerTransition.podspec
UINavigationController+TRVSNavigationControllerTransition.h
UINavigationController+TRVSNavigationControllerTransition.m

README.markdown

UINavigationController+TRVSNavigationControllerTransition Category


This category provides two methods on UINavigationControllers to push and pop view controllers with an animated transition of the entire UINavigationController's view, rather just the view controller's.

Author: Travis Jeffery

API

- (void)pushViewControllerWithNavigationControllerTransition:(UIViewController *)viewController;
- (void)popViewControllerWithNavigationControllerTransition;

Usages

One usage of this is when you push a view controller onto your UINavigationController and that view controller wants to have its navigationBar drawn above its view so that you can translate it in.

Example

The left photo below is using pushViewController:animated:, notice how the navigation bar in the current view is put out of view by making the navigation bar's origin y point -the navigation bar's height (so you can animate it in when the user scrolls) before the transition is finished. The right photo is using pushViewControllerWithNavigationControllerTransition:, now by using multiple layers we can keep the navigationBar visible in the current view until the transition completes. Keep an eye on the navigation bar.

Bad Good

MIT License, see the LICENSE file for details.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.