Index

RBPresentationController.h

Classes


RBPresentationController

Manages the presentation of view controllers within a parent view controller. For normal use, you do not need to create one of these, but can use them using the presentationController property on any UIViewController.

Properties

Whether or not the controller is currently presenting a view controller.
public isPresenting Bool { get }

Whether or not the controller is currently dismissing a view controller.
public isDismissing Bool { get }

Whether or not the controller currently has a view controller presented.
public isPresented Bool { get }

Whether or not the controller requires that the UI orientation is locked.
public requiresOrientationLock Bool { get }

The default animator to use when one isn't provided in a presentation context.
public defaultAnimator RBPresentationAnimator { get set }

The number of view controllers that are currently presented.
public presentedViewControllerCount Bool { get }

Functions

Initializes a new presentation controller.
@param viewController : The UIViewController that the presentation controller will belong to.
@returns The initialized presentation controller.
- (nullable id)initWithViewController:(nonnull UIViewController *)viewController;

Gets the presented view controller at the given index from the top.
@param indexFromTop : The zero-based index from the top.
@returns The presented UIViewController object.
- (nonnull UIViewController *)presentedViewControllerFromTop:(NSUInteger)indexFromTop;

Presents a view controller.
@param viewController : The UIViewController object to present.
@param positionBlock : The block that is called to determine the frame that the presented view should occupy.
@param animated : Whether or not the presentation transition should be animated.
@param completion : An optional block to be called when the presentation is complete.
@returns Whether or not the operation was successful.
- (BOOL)presentViewController:(nonnull UIViewController *)viewController

Presents a view controller.
@param viewController : The UIViewController object to present.
@param animator : The animator to use when presenting and dismissing the view controller.
@param positionBlock : The block that is called to determine the frame that the presented view should occupy.
@param animated : Whether or not the presentation transition should be animated.
@param completion : An optional block to be called when the presentation is complete.
@returns Whether or not the operation was successful.
- (BOOL)presentViewController:(nonnull UIViewController *)viewController

Dismisses the top-most presented view controller.
@param animated : Whether or not the dismissal should be animated.
@param completion : An optional block to be called when the dismissal is complete.
- (void)dismissViewControllerAnimated:(BOOL)animated