A set of methods used by the delegate to respond, with a preview view controller and a commit view controller, to the user pressing a view object on the screen of a device that supports 3D Touch.


protocol UIViewControllerPreviewingDelegate


To learn about 3D Touch, read Adopting 3D Touch on iPhone.


Providing Preview and Commit Views for 3D Touch

func previewingContext(UIViewControllerPreviewing, viewControllerForLocation: CGPoint) -> UIViewController?

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.


func previewingContext(UIViewControllerPreviewing, commit: UIViewController)

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



Inherits From

See Also

First Steps

Implementing Peek and Pop

Accelerate actions in your app by providing shortcuts to preview content in detail view controllers.

protocol UIViewControllerPreviewing

A set of methods that define the interface for configuring a previewing view controller on devices that support 3D Touch.