QLPreview object, or Quick Look preview controller, provides a specialized view for previewing an item. To display a Quick Look preview controller you have two options: You can push it into view using a
UINavigation object, or can present it modally, full screen, using the
present method of its parent class,
- iOS 4.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.
A Quick Look preview controller 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
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 (that is, full-screen) 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.
For details on providing items to a preview controller, refer to
QLPreview and QLPreviewItem Protocol Reference.