RBPresentationController Class Reference

Inherits from NSObject
Declared in RBPresentationController.h

Overview

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.

  isPresenting

Whether or not the controller is currently presenting a view controller.

@property (nonatomic, readonly) BOOL isPresenting

Declared In

RBPresentationController.h

  isDismissing

Whether or not the controller is currently dismissing a view controller.

@property (nonatomic, readonly) BOOL isDismissing

Declared In

RBPresentationController.h

  isPresented

Whether or not the controller currently has a view controller presented.

@property (nonatomic, readonly) BOOL isPresented

Declared In

RBPresentationController.h

  requiresOrientationLock

Whether or not the controller requires that the UI orientation is locked.

@property (nonatomic, readonly) BOOL requiresOrientationLock

Declared In

RBPresentationController.h

  defaultAnimator

The default animator to use when one isn’t provided in a presentation context.

@property (nonatomic, nonnull) RBPresentationAnimator *defaultAnimator

Declared In

RBPresentationController.h

  presentedViewControllerCount

The number of view controllers that are currently presented.

@property (nonatomic, readonly) NSUInteger presentedViewControllerCount

Declared In

RBPresentationController.h

– presentedViewControllerFromTop:

Gets the presented view controller at the given index from the top.

- (nonnull UIViewController *)presentedViewControllerFromTop:(NSUInteger)indexFromTop

Parameters

indexFromTop

The zero-based index from the top.

Return Value

The presented UIViewController object.

Declared In

RBPresentationController.h

– presentViewController:withPositionBlock:animated:completion:

Presents a view controller.

- (BOOL)presentViewController:(nonnull UIViewController *)viewController withPositionBlock:(nullable CGRect ( ^ ) ( ))positionBlock animated:(BOOL)animated completion:(nullable dispatch_block_t)completion

Parameters

viewController

The UIViewController object to present.

positionBlock

The block that is called to determine the frame that the presented view should occupy.

animated

Whether or not the presentation transition should be animated.

completion

An optional block to be called when the presentation is complete.

Return Value

Whether or not the operation was successful.

Declared In

RBPresentationController.h

– presentViewController:usingAnimator:withPositionBlock:animated:completion:

Presents a view controller.

- (BOOL)presentViewController:(nonnull UIViewController *)viewController usingAnimator:(nonnull RBPresentationAnimator *)animator withPositionBlock:(nullable CGRect ( ^ ) ( ))positionBlock animated:(BOOL)animated completion:(nullable dispatch_block_t)completion

Parameters

viewController

The UIViewController object to present.

animator

The animator to use when presenting and dismissing the view controller.

positionBlock

The block that is called to determine the frame that the presented view should occupy.

animated

Whether or not the presentation transition should be animated.

completion

An optional block to be called when the presentation is complete.

Return Value

Whether or not the operation was successful.

Declared In

RBPresentationController.h

– dismissViewControllerAnimated:completion:

Dismisses the top-most presented view controller.

- (void)dismissViewControllerAnimated:(BOOL)animated completion:(nullable dispatch_block_t)completion

Parameters

animated

Whether or not the dismissal should be animated.

completion

An optional block to be called when the dismissal is complete.

Declared In

RBPresentationController.h

– bringSubviewsToFront

Brings all presentation views to the front.

- (void)bringSubviewsToFront

Declared In

RBPresentationController.h

– setNeedsLayout

Repositions all presentation views.

- (void)setNeedsLayout

Declared In

RBPresentationController.h