RBPresentationAnimator Class Reference

Inherits from NSObject
Conforms to RBThemeTrackerDelegate
Declared in RBPresentationAnimator.h

Overview

Performs the animated transitions presenting and dismissing view controllers.

  theme

The theming tracker object for the view.

@property (nonatomic, readonly, nonnull) RBThemeTracker *theme

Discussion

The theming tracker object for the view.

Declared In

RBPresentationAnimator.h

  animator

The RBAnimator object to use when animating.

@property (nonatomic, readonly, nonnull) RBAnimator *animator

Discussion

The RBAnimator object to use when animating.

Declared In

RBPresentationAnimator.h

  animatorCanDismiss

Whether or not the animator is allowed to dismiss view controllers. For example, when the background is tapped.

@property (nonatomic) BOOL animatorCanDismiss

Discussion

Whether or not the animator is allowed to dismiss view controllers. For example, when the background is tapped.

Declared In

RBPresentationAnimator.h

– presentWithContext:animated:completion:

Presents a view controller with the given context.

- (BOOL)presentWithContext:(nonnull RBPresentationContext *)presentationContext animated:(BOOL)animated completion:(nullable dispatch_block_t)completion

Parameters

presentationContext

The configured presentation context.

animated

Whether or not the presentation should be animated.

completion

A block that is called when the presentation is complete.

Return Value

Whether or not the operation was successful.

Discussion

Presents a view controller with the given context.

Declared In

RBPresentationAnimator.h

– repositionWithContext:

Causes the given presentation context, if presented, to reposition the view. This is typically called when the presenting view bounds change.

- (BOOL)repositionWithContext:(nonnull RBPresentationContext *)presentationContext

Parameters

presentationContext

The presentation context to reposition.

Return Value

Whether or not the operation was successful.

Discussion

Causes the given presentation context, if presented, to reposition the view. This is typically called when the presenting view bounds change.

Declared In

RBPresentationAnimator.h

– dismissWithContext:animated:completion:

Dismisses a presented presentation context.

- (BOOL)dismissWithContext:(nonnull RBPresentationContext *)presentationContext animated:(BOOL)animated completion:(nullable dispatch_block_t)completion

Parameters

presentationContext

The presentation context to dismiss.

animated

Whether or not the dismissal should be animated.

completion

A block that is called when the dismissal is complete.

Return Value

Whether or not the operation was successful.

Discussion

Dismisses a presented presentation context.

Declared In

RBPresentationAnimator.h

– performPresentationWithContext:toFrame:animated:completion:

Performs a presentation with the given context and frame.

- (void)performPresentationWithContext:(nonnull RBPresentationContext *)presentationContext toFrame:(CGRect)frame animated:(BOOL)animated completion:(nullable dispatch_block_t)completion

Parameters

presentationContext

The presentation context to present.

frame

The frame to present the view to.

animated

Whether or not the presentation should be animated.

completion

A block that is called when the presentation is complete.

Discussion

Performs a presentation with the given context and frame.

Declared In

RBPresentationAnimator.h

– performRepositionWithContext:toFrame:

Performs a repositioning with the given context and frame.

- (void)performRepositionWithContext:(nonnull RBPresentationContext *)presentationContext toFrame:(CGRect)frame

Parameters

presentationContext

The presentation context to reposition.

frame

The frame to reposition the view to.

Discussion

Performs a repositioning with the given context and frame.

Declared In

RBPresentationAnimator.h

– performDismissalWithContext:animated:completion:

Performs a dismissal of the given context.

- (void)performDismissalWithContext:(nonnull RBPresentationContext *)presentationContext animated:(BOOL)animated completion:(nullable dispatch_block_t)completion

Parameters

presentationContext

The presentation context to dismiss.

animated

Whether or not the dismissal should be animated.

completion

A block that is called when the dismissal is complete.

Discussion

Performs a dismissal of the given context.

Declared In

RBPresentationAnimator.h

– updateContext:withViewStack:doesRequireOrientationLock:data:

Updates the state of the context.

- (void)updateContext:(nonnull RBPresentationContext *)presentationContext withViewStack:(nonnull NSArray *)viewStack doesRequireOrientationLock:(BOOL)doesRequireOrientationLock data:(nullable NSDictionary *)data

Parameters

presentationContext

The context to update.

viewStack

The stack of views that constitute it’s presentation.

doesRequireOrientationLock

Whether or not the presentation of this context requires that the device orientation does not change.

data

Additional data associated with the presentation.

Discussion

Updates the state of the context.

Declared In

RBPresentationAnimator.h

– requestDismissalWithPresentationContext:

Called when the animator requests that the presentation context is dismissed.

- (void)requestDismissalWithPresentationContext:(nonnull RBPresentationContext *)presentationContext

Parameters

presentationContext

The presentation context to dismiss.

Discussion

Called when the animator requests that the presentation context is dismissed.

Declared In

RBPresentationAnimator.h