Index

RBNavigationController.h

Protocols

Classes


RBNavigationController

A customisable navigation controller.

Properties

An array of the view controllers currently on the navigation stack.
public viewControllers NSArray { get }

The view controller behind the currently displayed view controller.
public previousViewController UIViewController? { get }

The animator that is used to provide animated push and pop transitions.
public animator RBNavigationAnimator { get set }

Whether or not the user can swipe from the edge to pop a view controller.
public swipePopEnabled Bool { get set }

An optional delegate to be informed of navigation events.
public weak delegate RBNavigationControllerDelegate? { get set }

Functions

Retrieves the view controller at the given index from the top. The visible view controller has an index of 0.
@param index : The index from the top of the view controller desired.
@returns The retrieved view controller.
- (nullable UIViewController *)viewControllerFromTop:(NSInteger)index;

Pushes a view controller to the navigation stack.
@param viewController : The view controller to push to the navigation stack.
@param animated : Whether or not the operation should be animated.
@param completion : An optional block to be called when the operation is complete.
- (void)pushViewController:(nonnull UIViewController *)viewController

Pushes a view controller to the navigation stack.
@param viewController : The view controller to push to the navigation stack.
@param animator : An Optional RBNavigationAnimator to use for animating.
@param completion : An optional block to be called when the operation is complete.
- (void)pushViewController:(nonnull UIViewController *)viewController

Pops all view controllers above the given view controller from the navigation stack. When the operation is complete, the given view controller will be the visible view controller.
@param viewController : The view controller to pop to.
@param animated : Whether or not the operation should be animated.
@param completion : An optional block to be called when the operation is complete.
@returns An array of the view controllers that were popped.
- (nonnull NSArray *)popToViewController:(nonnull UIViewController *)viewController

Pops all view controllers above the given view controller from the navigation stack. When the operation is complete, the given view controller will be the visible view controller.
@param viewController : The view controller to pop to.
@param animator : An Optional RBNavigationAnimator to use for animating.
@param completion : An optional block to be called when the operation is complete.
@returns An array of the view controllers that were popped.
- (nonnull NSArray *)popToViewController:(nonnull UIViewController *)viewController

Pops the top view controller from the navigation stack.
@param animated : Whether or not the operation should be animated.
@param completion : An optional block to be called when the operation is complete.
@returns The view controller that was popped.
- (nullable UIViewController *)popViewControllerAnimated:(BOOL)animated

Pops the top view controller from the navigation stack using a specific optional animator.
@param animator : An Optional RBNavigationAnimator to use for animating.
@param completion : An optional block to be called when the operation is complete.
@returns The view controller that was popped.
- (nullable UIViewController *)popViewControllerWithAnimator:(nullable RBNavigationAnimator *)animator

Pops all view controllers except the first view controller.
@param animated : Whether or not the operation should be animated.
@param completion : An optional block to be called when the operation is complete.
@returns An array of the view controllers that were popped.
- (nonnull NSArray *)popToRootViewControllerAnimated:(BOOL)animated

Pops all view controllers except the first view controller using a specific optional animator.
@param animator : An Optional RBNavigationAnimator to use for animating.
@param completion : An optional block to be called when the operation is complete.
@returns An array of the view controllers that were popped.
- (nonnull NSArray *)popToRootViewControllerWithAnimator:(nullable RBNavigationAnimator *)animator

Removes the view controllers in the given range. There is no animation for this operation.
@param range : The NSRange of the view controllers to remove.
- (void)removeViewControllersInRange:(NSRange)range;

Removes all view controllers between the ones given.
@param viewControllerA : The first view controller.
@param viewControllerB : The second view controller.
- (void)removeViewControllersBetween:(nonnull UIViewController *)viewControllerA