Instance Method

dismissModalViewControllerAnimated:

Dismisses the view controller that was presented by the receiver.

Declaration

- (void)dismissModalViewControllerAnimated:(BOOL)animated;

Parameters

animated

If YES, this method animates the view as it'€™s dismissed; otherwise, it does not. The style of animation is determined by the value in the modalTransitionStyle property of the view controller being dismissed.

Discussion

The presenting view controller is responsible for dismissing the view controller it presented. If you call this method on the presented view controller itself, however, it automatically forwards the message to the presenting view controller.

If you present several view controllers in succession, and thus build a stack of presented view controllers, calling this method on a view controller lower in the stack dismisses its immediate child view controller and all view controllers above that child on the stack. When this happens, only the top-most view is dismissed in an animated fashion; any intermediate view controllers are simply removed from the stack. The top-most view is dismissed using its modal transition style, which may differ from the styles used by other view controllers lower in the stack.

If you want to retain a reference to the receiver'€™s presented view controller, get the value in the modalViewController property before calling this method.

See Also

Methods

- registerForPreviewingWithDelegate:sourceView:

Registers a view controller to participate with 3D Touch preview (peek) and commit (pop).

Deprecated
- unregisterForPreviewingWithContext:

Unregisters a previously registered view controller identified by its context object.

Deprecated
- automaticallyForwardAppearanceAndRotationMethodsToChildViewControllers

Returns a Boolean value that indicates whether appearance and rotation methods are forwarded.

Deprecated
- canPerformUnwindSegueAction:fromViewController:withSender:

Called on a view controller to determine whether it wants to respond to an unwind action.

Deprecated
- didAnimateFirstHalfOfRotationToInterfaceOrientation:

Sent to the view controller after the completion of the first half of the user interface rotation.

Deprecated
- didRotateFromInterfaceOrientation:

Sent to the view controller after the user interface rotates.

Deprecated
- dismissMoviePlayerViewControllerAnimated

Dismisses a movie player view controller using the standard movie player transition.

Deprecated
- viewControllerForUnwindSegueAction:fromViewController:withSender:

Called when an unwind segue action wants to search a container'€™s children for a view controller to handle the unwind action.

Deprecated
+ prepareInterstitialAds

Prepares the iAd framework to display interstitial ads, which may involve prefetching ad assets.

Deprecated
- presentModalViewController:animated:

Presents a modal view managed by the given view controller to the user.

Deprecated
- presentMoviePlayerViewControllerAnimated:

Presents the movie player view controller using the standard movie player transition.

Deprecated
- requestInterstitialAdPresentation

Asks the framework to display an interstitial ad.

Deprecated
- rotatingFooterView

Returns the footer view to transition during an interface orientation change.

Deprecated
- rotatingHeaderView

Returns the header view to transition during an interface orientation change.

Deprecated
- segueForUnwindingToViewController:fromViewController:identifier:

Called when an unwind segue action needs to transition between two view controllers.

Deprecated
- shouldAutomaticallyForwardRotationMethods

Returns a Boolean value indicating whether rotation methods are forwarded to child view controllers.

Deprecated
- shouldAutorotateToInterfaceOrientation:

Returns a Boolean value indicating whether the view controller supports the specified orientation.

Deprecated
- viewDidUnload

Called when the controller'€™s view is released from memory.

Deprecated
- viewWillUnload

Called just before releasing the controller'€™s view from memory.

Deprecated
- willAnimateFirstHalfOfRotationToInterfaceOrientation:duration:

Sent to the view controller before performing the first half of a user interface rotation.

Deprecated
- willAnimateRotationToInterfaceOrientation:duration:

Sent to the view controller before performing a one-step user interface rotation.

Deprecated
- willAnimateSecondHalfOfRotationFromInterfaceOrientation:duration:

Sent to the view controller before the second half of the user interface rotates.

Deprecated
- willRotateToInterfaceOrientation:duration:

Sent to the view controller just before the user interface begins rotating.

Deprecated