Inherits from UIViewController
Conforms to UIGestureRecognizerDelegate
Declared in FRLayeredNavigationController.h
FRLayeredNavigationController.m

Overview

The FRLayeredNavigationController class implements a container view controller that manages the navigation of hierarchical content. This class is not intended for subclassing.

The API and the usage is very similar to UINavigationController .

Tasks

Properties

delegate

The delegate for the controller.

@property (nonatomic, weak) id<FRLayeredNavigationControllerDelegate> delegate

Discussion

The delegate for the controller.

Declared In

FRLayeredNavigationController.h

dropLayersWhenPulledRight

Wheater to drop all layers except the root view controller when pulled far enough to the right

@property (nonatomic) BOOL dropLayersWhenPulledRight

Discussion

Wheater to drop all layers except the root view controller when pulled far enough to the right

Declared In

FRLayeredNavigationController.h

topViewController

The view controller in the top layer. (read-only)

@property (nonatomic, readonly) UIViewController *topViewController

Discussion

The view controller in the top layer. (read-only)

Declared In

FRLayeredNavigationController.h

userInteractionEnabled

If user interaction on the layered navigation controller is enabled.

@property (nonatomic) BOOL userInteractionEnabled

Discussion

If user interaction on the layered navigation controller is enabled.

Declared In

FRLayeredNavigationController.h

viewControllers

Returns all the UIViewController objects being managed by the FRNavigationController. Note that, unlike a UINavigationController, this is a readonly property.

@property (nonatomic, readonly) NSArray *viewControllers

Discussion

Returns all the UIViewController objects being managed by the FRNavigationController. Note that, unlike a UINavigationController, this is a readonly property.

Declared In

FRLayeredNavigationController.h

Instance Methods

compressViewControllers:

Compresses all visible view controllers together, so they’re all separated by the minimum distance.

- (void)compressViewControllers:(BOOL)animated

Parameters

animated

Set this value to YES to animate any layer movement that occurs as a result of the compacting.

Discussion

Compresses all visible view controllers together, so they’re all separated by the minimum distance.

Declared In

FRLayeredNavigationController.h

initWithRootViewController:

Initializes and returns a newly created layered navigation controller.

- (id)initWithRootViewController:(UIViewController *)rootViewController

Parameters

rootViewController

The view controller that resides at the bottom of the navigation stack.

Discussion

Initializes and returns a newly created layered navigation controller.

Declared In

FRLayeredNavigationController.h

initWithRootViewController:configuration:

Initializes and returns a newly created layered navigation controller. Does the same as initWithRootViewController: but has the ability to configure some parameters for the root view controller.

- (id)initWithRootViewController:(UIViewController *)rootViewController configuration:(void ( ^ ) ( FRLayeredNavigationItem *item ))configuration

Parameters

rootViewController

The view controller that resides at the bottom of the navigation stack.

configuration

A block object you can use to control some parameters (such as the width) for the root view controller. The block’s only parameter is an instance of FRLayeredNavigationItem .

Discussion

Initializes and returns a newly created layered navigation controller. Does the same as initWithRootViewController: but has the ability to configure some parameters for the root view controller.

Declared In

FRLayeredNavigationController.h

popToRootViewControllerAnimated:

Pops all the view controllers on the stack except the root view controller and updates the display.

- (void)popToRootViewControllerAnimated:(BOOL)animated

Parameters

animated

Set this value to YES to animate the transition. Pass NO if you are setting up a layered navigation controller before its view is displayed.

Discussion

Pops all the view controllers on the stack except the root view controller and updates the display.

Declared In

FRLayeredNavigationController.h

popToRootViewControllerAnimated:direction:

Pops all the view controllers on the stack except the root view controller and updates the display.

- (void)popToRootViewControllerAnimated:(BOOL)animated direction:(FRLayeredAnimationDirection)direction

Parameters

animated

Set this value to YES to animate the transition. Pass NO if you are setting up a layered navigation controller before its view is displayed.

direction

Set this value to an FRLayeredAnimationDirection indicating the direction that layers will animate off the screen. This parameter is ignored if animated is NO.

Discussion

Pops all the view controllers on the stack except the root view controller and updates the display.

Declared In

FRLayeredNavigationController.h

popToViewController:animated:

Pops view controllers until the specified view controller is at the top of the navigation stack.

- (void)popToViewController:(UIViewController *)vc animated:(BOOL)animated

Parameters

vc

The view controller until which to pop.

animated

Set this value to YES to animate the transition. Pass NO if you are setting up a layered navigation controller before its view is displayed.

Discussion

Pops view controllers until the specified view controller is at the top of the navigation stack.

Declared In

FRLayeredNavigationController.h

popToViewController:animated:direction:

Pops view controllers until the specified view controller is at the top of the navigation stack.

- (void)popToViewController:(UIViewController *)vc animated:(BOOL)animated direction:(FRLayeredAnimationDirection)direction

Parameters

vc

The view controller until which to pop.

animated

Set this value to YES to animate the transition. Pass NO if you are setting up a layered navigation controller before its view is displayed.

direction

Set this value to an FRLayeredAnimationDirection indicating the direction that layers will animate off the screen. This parameter is ignored if animated is NO.

Discussion

Pops view controllers until the specified view controller is at the top of the navigation stack.

Declared In

FRLayeredNavigationController.h

popViewControllerAnimated:

Pops the top view controller from the navigation stack and updates the display.

- (void)popViewControllerAnimated:(BOOL)animated

Parameters

animated

Set this value to YES to animate the transition. Pass NO if you are setting up a layered navigation controller before its view is displayed.

Discussion

Pops the top view controller from the navigation stack and updates the display.

Declared In

FRLayeredNavigationController.h

popViewControllerAnimated:direction:

Pops the top view controller from the navigation stack and updates the display.

- (void)popViewControllerAnimated:(BOOL)animated direction:(FRLayeredAnimationDirection)direction

Parameters

animated

Set this value to YES to animate the transition. Pass NO if you are setting up a layered navigation controller before its view is displayed.

direction

Set this value to an FRLayeredAnimationDirection indicating the direction that layer will animate off the screen. This parameter is ignored if animated is NO.

Discussion

Pops the top view controller from the navigation stack and updates the display.

Declared In

FRLayeredNavigationController.h

pushViewController:inFrontOf:maximumWidth:animated:

Pushes a view controller onto the stack on top of anchorViewController and updates the display. All view controllers already on top of anchorViewController get popped automatically first.

- (void)pushViewController:(UIViewController *)viewController inFrontOf:(UIViewController *)anchorViewController maximumWidth:(BOOL)maxWidth animated:(BOOL)animated

Parameters

viewController

The UIViewController to push on the navigation stack.

anchorViewController

The UIViewController on top of which the new view controller should get pushed.

maxWidth

YES if viewController is a content view controller and should therefore use all the remaining screen width.

animated

Set this value to YES to animate the transition. Pass NO if you are setting up a layered navigation controller before its view is displayed.

Discussion

Pushes a view controller onto the stack on top of anchorViewController and updates the display. All view controllers already on top of anchorViewController get popped automatically first.

Declared In

FRLayeredNavigationController.h

pushViewController:inFrontOf:maximumWidth:animated:configuration:

Pushes a view controller onto the stack on top of anchorViewController and updates the display. All view controllers already on top of anchorViewController get popped automatically first.

- (void)pushViewController:(UIViewController *)viewController inFrontOf:(UIViewController *)anchorViewController maximumWidth:(BOOL)maxWidth animated:(BOOL)animated configuration:(void ( ^ ) ( FRLayeredNavigationItem *item ))configuration

Parameters

viewController

The UIViewController to push on the navigation stack.

anchorViewController

The UIViewController on top of which the new view controller should get pushed.

maxWidth

YES if viewController is a content view controller and should therefore use all the remaining screen width.

animated

Set this value to YES to animate the transition. Pass NO if you are setting up a layered navigation controller before its view is displayed.

configuration

A block object you can use to control some parameters (such as the width) for the new view controller. The block’s only parameter is a newly created instance of FRLayeredNavigationItem .

Discussion

Pushes a view controller onto the stack on top of anchorViewController and updates the display. All view controllers already on top of anchorViewController get popped automatically first.

Declared In

FRLayeredNavigationController.h

pushViewController:inFrontOf:maximumWidth:animated:configuration:direction:

Pushes a view controller onto the stack on top of anchorViewController and updates the display. All view controllers already on top of anchorViewController get popped automatically first.

- (void)pushViewController:(UIViewController *)viewController inFrontOf:(UIViewController *)anchorViewController maximumWidth:(BOOL)maxWidth animated:(BOOL)animated configuration:(void ( ^ ) ( FRLayeredNavigationItem *item ))configuration direction:(FRLayeredAnimationDirection)direction

Parameters

viewController

The UIViewController to push on the navigation stack.

anchorViewController

The UIViewController on top of which the new view controller should get pushed.

maxWidth

YES if viewController is a content view controller and should therefore use all the remaining screen width.

animated

Set this value to YES to animate the transition. Pass NO if you are setting up a layered navigation controller before its view is displayed.

configuration

A block object you can use to control some parameters (such as the width) for the new view controller. The block’s only parameter is a newly created instance of FRLayeredNavigationItem .

direction

Set this value to an FRLayeredAnimationDirection indicating the direction that layer will animate in from on the screen. This parameter is ignored if animated is NO.

Discussion

Pushes a view controller onto the stack on top of anchorViewController and updates the display. All view controllers already on top of anchorViewController get popped automatically first.

Declared In

FRLayeredNavigationController.h