Instance Property

sourceView

A source view, in a previewing view controller’s view hierarchy, responds to a 3D Touch by the user.

Required.

Declaration

@property(nonatomic, readonly) UIView *sourceView;

Discussion

Set the value of this property when you register a view controller to participate in 3D Touch. Do this in the view controller’s registerForPreviewingWithDelegate:sourceView: method.

When the user begins to press on the source view, the system blurs the surrounding area to let the user know that a preview (peek) is available. At this time, the system calls your previewingContext:viewControllerForLocation: method to let you prepare the presentation of a preview. If the user presses more deeply, the system presents the preview defined in your delegate method.

If the user presses deeper on the preview, the system navigates to the view you’ve specified in your previewingContext:commitViewController: method. The commit view then fills the bounds of the app’s window.

See Also

Accessing Properties of a 3D Touch Previewing View Controller

delegate

The previewing view controller's delegate for managing preview (peek) and commit (pop) view controllers.

Required.

Deprecated