UIViewControllerPreviewingDelegate.CommitViewController(IUIViewControllerPreviewing, UIViewController) UIViewControllerPreviewingDelegate.CommitViewController(IUIViewControllerPreviewing, UIViewController) Method


Called when the user performs the 3D Touch "Pop" pressure gesture that begins the transfer to the final UX, which is typically contained in the viewControllerToCommit.

public abstract void CommitViewController (UIKit.IUIViewControllerPreviewing previewingContext, UIKit.UIViewController viewControllerToCommit);
abstract member CommitViewController : UIKit.IUIViewControllerPreviewing * UIKit.UIViewController -> unit


IUIViewControllerPreviewing IUIViewControllerPreviewing

The context in which the 3D Touch is occurring.

UIViewController UIViewController

The UIViewController to which the app should transfer control.



On hardware that supports 3D Touch (see ForceTouchCapability), a strong push activates the transfer to the new UI, which is typically specified by viewControllerToCommit. However, the application developer can provide custom UX (for example, to provide a more in-depth editing experience) by passing their desired view controller to ShowViewController(UIViewController, NSObject) inside this method.

public void CommitViewController (IUIViewControllerPreviewing previewingContext, UIViewController viewControllerToCommit)
			ShowViewController (viewControllerToCommit, this);

Applies to