2. What is Quick Look?
Previews all common 鍖les
Includes AirPrint
Available since iOS 4.0
3. QLPreviewItem
Protocol for previewing 鍖les
(Required) -(NSURL)previewItemURL
Must be a 鍖le URL (i.e. 鍖le://some鍖le.txt)
Use [NSURL 鍖leURLWithPath: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 鍖les on the local system
More control than QLPreviewController
Only previews one 鍖le
Provides easy access to a 鍖les icons
Provides access to annotation property for passing
custom data with a 鍖le
9. Inter-app File Sharing
Files arent shared, they are copied into the apps
sandbox (~Documents/Inbox)
An apps Info.plist speci鍖es which 鍖les 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 鍖les
Alternate: Secondary viewer
None: Files can only be loaded through iTunes
Default: Accepts 鍖les