Editar

Compartir a través de


UIViewControllerPreviewingDelegate.CommitViewController Method

Definition

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.

[Foundation.Export("previewingContext:commitViewController:")]
public abstract void CommitViewController (UIKit.IUIViewControllerPreviewing previewingContext, UIKit.UIViewController viewControllerToCommit);
abstract member CommitViewController : UIKit.IUIViewControllerPreviewing * UIKit.UIViewController -> unit

Parameters

previewingContext
IUIViewControllerPreviewing

The context in which the 3D Touch is occurring.

viewControllerToCommit
UIViewController

The UIViewController to which the app should transfer control.

Implements

Attributes

Remarks

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