Instance Method

previewingContext:commitViewController:

Called to let you prepare the presentation of a commit (pop) view from your commit view controller.

Required.

Declaration

- (void)previewingContext:(id<UIViewControllerPreviewing>)previewingContext commitViewController:(UIViewController *)viewControllerToCommit;

Parameters

previewingContext

The context object for the previewing view controller.

viewControllerToCommit

The view controller whose view your implementation of this method is moving into place as a commit (pop) view.

Discussion

Implement this method to configure and present the commit (pop) view controller, in a way that is appropriate for your app.

For example, to present the commit view controller’s view in a navigation controller, call the navigation controller’s showViewController:sender: method; to present the view modally, you could call the presentViewController:animated:completion: method.

See Also

Providing Preview and Commit Views for 3D Touch

- previewingContext:viewControllerForLocation:

Called when the user has pressed a source view in a previewing view controller, thereby obtaining a surrounding blur to indicate that a preview (peek) is available.

Required.

Deprecated