presentPreview(animated:)
Displays a full-screen preview of the target document.
Declaration
func presentPreview(animated: Bool) -> BoolParameters
Return Value
true if this method was able to display the document preview or false if it was not.
Discussion
To use this method, you must first provide a delegate object that implements the documentInteractionControllerViewControllerForPreview(_:) method. The view controller returned by that method is used to present the document preview modally.
If your delegate implements the documentInteractionControllerViewForPreview(_:) and documentInteractionControllerRectForPreview(_:) methods, the view and rectangle returned by those methods is used as the starting point for the animation used to display the document preview. If the animated parameter is true but your delegate does not implement the documentInteractionControllerViewForPreview(_:) method (or that method returns nil), the document preview is animated into place using a crossfade transition.
This method displays the document preview asynchronously. The document interaction controller dismisses the document preview automatically in response to appropriate user interactions. You can also dismiss the preview programmatically using the dismissPreview(animated:) method.