Instance Property

previewActionItems

The quick actions displayed when a user swipes upward on a 3D Touch preview.

Declaration

var previewActionItems: [UIPreviewActionItem] { get }

Return Value

An array of preview (peek) quick actions.

Discussion

This property is for use with a preview (peek) view controller which you present in your implementation of the previewingContext(_:viewControllerForLocation:) delegate method..

Implement this method to provide quick actions for such a preview. When the user swipes upward on the preview, the system presents these quick action items in a sheet below the preview.

The default implementation of this method returns an empty array.

For guidance on appropriate items to include as preview quick actions, read the material on 3D Touch in the iOS Technologies chapter of iOS Human Interface Guidelines.

For more information on preview quick actions, see UIPreviewActionItem and UIPreviewAction.

See Also

Working With 3D Touch Previews and Preview Quick Actions

func registerForPreviewing(with: UIViewControllerPreviewingDelegate, sourceView: UIView) -> UIViewControllerPreviewing

Registers a view controller to participate with 3D Touch preview (peek) and commit (pop).

func unregisterForPreviewing(withContext: UIViewControllerPreviewing)

Unregisters a previously registered view controller identified by its context object.