Contents

documentInteractionControllerRectForPreview(_:)

Called when a document interaction controller needs the rectangle to use as the starting point for animating the display of a document preview.

Declaration

optional func documentInteractionControllerRectForPreview(_ controller: UIDocumentInteractionController) -> CGRect

Parameters

  • controller:

    The document interaction controller requesting the starting rectangle.

Return Value

A rectangle in the coordinate system of the view returned by the documentInteractionControllerViewForPreview(_:) method.

Discussion

If you do not implement the documentInteractionControllerViewForPreview(_:) method, or if you do implement it but return a nil value, this method is not called. If you do not implement this method, the starting rectangle is assumed to be the bounds of the view returned by the documentInteractionControllerViewForPreview(_:) method.

See Also

Configuring the parent view controller