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
Discussion
Whether or not the controller is currently presenting a view controller.
Declared In
RBPresentationController.h
isDismissing
Whether or not the controller is currently dismissing a view controller.
@property (nonatomic, readonly) BOOL isDismissing
Discussion
Whether or not the controller is currently dismissing a view controller.
Declared In
RBPresentationController.h
isPresented
Whether or not the controller currently has a view controller presented.
@property (nonatomic, readonly) BOOL isPresented
Discussion
Whether or not the controller currently has a view controller presented.
Declared In
RBPresentationController.h
requiresOrientationLock
Whether or not the controller requires that the UI orientation is locked.
@property (nonatomic, readonly) BOOL requiresOrientationLock
Discussion
Whether or not the controller requires that the UI orientation is locked.
Declared In
RBPresentationController.h
defaultAnimator
The default animator to use when one isn’t provided in a presentation context.
@property (nonatomic, nonnull) RBPresentationAnimator *defaultAnimator
Discussion
The default animator to use when one isn’t provided in a presentation context.
Declared In
RBPresentationController.h
presentedViewControllerCount
The number of view controllers that are currently presented.
@property (nonatomic, readonly) NSUInteger presentedViewControllerCount
Discussion
The number of view controllers that are currently presented.
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.
Discussion
Gets the presented view controller at the given index from the top.
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 |
---|---|
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.
Discussion
Presents a view controller.
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 |
---|---|
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.
Discussion
Presents a view controller.
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. |
Discussion
Dismisses the top-most presented view controller.
Declared In
RBPresentationController.h
– bringSubviewsToFront
Brings all presentation views to the front.
- (void)bringSubviewsToFront
Discussion
Brings all presentation views to the front.
Declared In
RBPresentationController.h
– setNeedsLayout
Repositions all presentation views.
- (void)setNeedsLayout
Discussion
Repositions all presentation views.
Declared In
RBPresentationController.h