2. What is Quick Look?
Previews all common files
Includes AirPrint
Available since iOS 4.0
3. QLPreviewItem
Protocol for previewing files
(Required) -(NSURL)previewItemURL
Must be a file URL (i.e. file://somefile.txt)
Use [NSURL fileURLWithPath:somePath]
(Optional) -(NSString)previewItemTitle
NSURL conforms to QLPreviewItem
7. QLPreviewControllerDelegate
Provides call backs for when the view will dismiss and
did dismiss
Provides a couple animation call backs
One call back asking permission to open URLs
8. UIDocumentInteractionController
Manages user interactions with files on the local system
More control than QLPreviewController
Only previews one file
Provides easy access to a file’s icons
Provides access to annotation property for passing
custom data with a file
9. Inter-app File Sharing
Files aren’t “shared,” they are copied into the app’s
sandbox (~Documents/Inbox)
An app’s Info.plist specifies which files are accepted
with the CFBundleDocumentTypes key
CFBundleDocumentTypes is an array of dictionaries
10. Inter-app File Sharing
CFBundleDocumentTypes sub keys:
CFBundleTypeName: Name of the type
CFBundleTypeIconFiles: array of icons (smallest to
largest)
LSItemContentTypes: array of UTIs
LSHandlerRank: Owner, Alternate, None, Default
11. Inter-app File Sharing
LSHandlerRank (in order of precedence):
Owner: Creator of these files
Alternate: Secondary viewer
None: Files can only be loaded through iTunes
Default: Accepts files