present(from:in:animated:completionHandler:)
Presents the iPad printing user interface in a popover view, optionally animating it from any area in a view.
Declaration
func present(from rect: CGRect, in view: UIView, animated: Bool, completionHandler completion: UIPrintInteractionController.CompletionHandler? = nil) -> BoolParameters
- rect:
A rectangle that defines the area from which the printing popover view is animated.
- view:
The view providing the coordinate system for
rect. - animated:
True to animate the printing popover view from
item, False to display it immediately. - completion:
A block of type Completionhandler that you implement to handle the conclusion of the print job (for instance, to reset state) and to handle any errors encountered in printing.
Discussion
It is valid to call this method for applications on iPad devices. Calling this method on an iPhone or iPod touch with animated set to true causes the printing options view to animate upward from the bottom of the screen.
If you call this method when the printing options are already displayed, UIPrintInteractionController hides the printing-options popover view. You must call the method again to display the options.