Class

UITargetedPreview

An object describing the view to use during preview-related animations.

Declaration

class UITargetedPreview : NSObject

Overview

Use a UITargetedPreview to specify the view to use during an animated transition.

Topics

Creating a Targeted Preview Object

init(view: UIView, parameters: UIPreviewParameters, target: UIPreviewTarget)

Creates a targeted preview with the specified view, parameters, and target container.

init(view: UIView, parameters: UIPreviewParameters)

Creates a targeted preview for a view in the current window and including the specified parameters.

init(view: UIView)

Creates a targeted preview for a view in the current window.

Getting the Preview Attributes

var view: UIView

The view that is the target of the animation.

var target: UIPreviewTarget

The container for the target view.

var size: CGSize

The size of the view.

var parameters: UIPreviewParameters

Additional parameters to use when configuring the animations.

Changing the Target's Container

func retargetedPreview(with: UIPreviewTarget) -> UITargetedPreview

Returns a targeted preview object with the same view and parameters, but with a different target container.

Relationships

Inherits From

See Also

Contextual Menus

class UIContextMenuInteraction

An interaction object that you use to display relevant actions for your content.

protocol UIContextMenuInteractionDelegate

The methods for providing the set of actions to perform on your content, and for customizing the preview of that content.

class UIPreviewTarget

An object that specifies the container view to use for animations.

class UIPreviewParameters

Additional parameters to use when animating a preview interface.