A specialized view for previewing an item.
- iOS 4.0+
- Mac Catalyst 13.0+
A displayed preview includes a title taken from the last path component of the item URL. You can override this by implementing a
preview accessor for the preview item.
QLPreview can display previews for the following items:
Microsoft Office documents (Office ‘97 and newer)
Rich Text Format (RTF) documents
Text files whose uniform type identifier (UTI) conforms to the
publictype (see Uniform Type Identifiers Reference)
Comma-separated value (csv) files
3D models in USDZ format (with both standalone and AR views for viewing the model)
QLPreview can be presented modally (that is, full-screen) by calling
present(_: from a presenting
UIView, or it can be pushed into view using a
To use a Quick Look preview controller, you must provide a data source object. The data source provides preview items to the controller and tells it how many items to include in a preview navigation list. If there is more than one item in the list, a modally-presented controller displays navigation arrows to let the user switch among the items. For a Quick Look preview controller pushed using a navigation controller, you can provide buttons in the navigation bar for moving through the navigation list.