Instance Method

animateAlongsideTransitionInView:animation:completion:

Runs the specified animations in a view that is outside of the designated container view.

Required.

Declaration

- (BOOL)animateAlongsideTransitionInView:(UIView *)view animation:(void (^)(id<UIViewControllerTransitionCoordinatorContext> context))animation completion:(void (^)(id<UIViewControllerTransitionCoordinatorContext> context))completion;

Parameters

view

The view (or one of its ancestors) in which the specified animations take place. This parameter must not be nil.

animation

A block containing the animations you want to perform. These animations run in the same context as the transition animations and therefore have the same default attributes. You may specify nil for this parameter.

The block has no return value and takes the following parameter:

context

The contextual information for performing the animations. Use this object to get the animation-related information. For more information, see UIViewControllerTransitionCoordinatorContext.

completion

The block of code to execute after the transition finishes. You may specify nil for this parameter. The block has no return value and takes the following parameter:

context

The contextual information for performing the animations. Use this object to get the animation-related information. For more information, see UIViewControllerTransitionCoordinatorContext.

Return Value

YES if the specified animation is successfully queued to run; otherwise NO.

Discussion

Use this method to perform animations that are not handled by the animator objects themselves. The animations you specify in the animation parameter must all take place in a view descended from the view you specify in the view parameter.

The animations in the animation parameter are normally performed concurrently with the view controller transition animations. That behavior applies when the animator object’s animateTransition: method is implemented using UIView-based animations. If the animator object uses Core Animation to animate the layer contents directly, your animations are run shortly after the animateTransition: method returns.

This method returns NO when the block in the animation parameter cannot be queued to run. The completion block can still run even when this method returns NO.

See Also

Responding to View Controller Transition Progress

- animateAlongsideTransition:completion:

Runs the specified animations at the same time as the view controller transition animations.

Required.

- notifyWhenInteractionChangesUsingBlock:

Registers a block to be executed when a transition changes from interactive to non-interactive.

Required.

- notifyWhenInteractionEndsUsingBlock:

Registers a block to be executed when a transition changes from interactive to non-interactive.

Required.

Deprecated

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software