### DocInteraction ###
================================================================================
DESCRIPTION:
This sample how to use UIDocumentInteractionController to obtain information about documents and how to preview them. There are two ways to preview documents: one is to use UIDocumentInteractionController's preview API, the other is directly use QLPreviewController. This sample also demonstrates the use of UIFileSharingEnabled feature so you can upload documents to the application using iTunes and then to preview them. With the help of "kqueue" kernel event notifications, the sample monitors the contents of the Documents folder.
In addition it leverages UIDocumentInteractionController's built-in UIGestureRecognizers (i.e. single tap = preview, tap-hold = options menu) by attaching them to the display icon.
DirectoryWatcher
An object used to help monitor the contents of the "Documents" folder by using "kqueue", a kernel event notification mechanism.
Normally apps would use these UIApplication delegate calls to scan the Documents folder for content changes:
- (void)applicationDidBecomeActive:(UIApplication *)application;
- (void)applicationWillResignActive:(UIApplication *)application;
With the DirectoryWatcher object, rather, you can detect changes without having to unnecessarily scan the Documents folder in numerous places in your code.
================================================================================
BUILD REQUIREMENTS:
iOS SDK 4.1 or later
================================================================================
RUNTIME REQUIREMENTS:
iOS 4.0 or later
================================================================================
CHANGES FROM PREVIOUS VERSIONS:
Version 1.4
- Upgraded to support iOS 5.0 SDK, added QLPreviewControllerDelegate to DITableViewController.h.
Version 1.3
- Upgraded to support iOS 4.2 SDK, QLPreviewController now navigates to a separate screen.
Version 1.2
- Fixed Xcode project deployment target to 4.0.
Version 1.1
- Modified and improved for previewing files in the Documents folder.
Version 1.0
- First Version, released for WWDC 2010
================================================================================
Copyright (C) 2010-2012 Apple Inc. All rights reserved.
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
DocInteraction.zip (33个子文件)
DocInteraction
main.m 3KB
DocInteraction_Prefix.pch 197B
images
Icon-Small@2x.png 1010B
iTunesArtwork 5KB
Icon.png 1007B
Icon-Small.png 918B
Icon@2x.png 1KB
Icon-Small-50.png 992B
Icon-72.png 1KB
DocInteraction.xcodeproj
project.xcworkspace
contents.xcworkspacedata 159B
xcuserdata
minyang.xcuserdatad
UserInterfaceState.xcuserstate 25KB
guohang.xcuserdatad
UserInterfaceState.xcuserstate 15KB
project.pbxproj 19KB
xcuserdata
minyang.xcuserdatad
xcschemes
xcschememanagement.plist 486B
DocInteraction.xcscheme 3KB
xcdebugger
Breakpoints.xcbkptlist 5KB
guohang.xcuserdatad
xcschemes
xcschememanagement.plist 486B
DocInteraction.xcscheme 3KB
.DS_Store 6KB
SampleDocs
Image Document.jpg 329KB
HTML Document.html 239B
Text Document.txt 211B
PDF Document.pdf 27KB
en.lproj
DITableViewController.xib 18KB
MainWindow.xib 24KB
DocInteraction-Info.plist 1KB
Classes
DirectoryWatcher.m 7KB
DocInteractionAppDelegate.h 3KB
DocInteractionAppDelegate.m 3KB
DirectoryWatcher.h 3KB
DITableViewController.m 13KB
DITableViewController.h 3KB
ReadMe.txt 2KB
共 33 条
- 1
资源评论
- yue2142015-09-16正式我要的东东 , 谢谢分享 , 很好很强大
- qq_319061712016-11-28我就没看到有任何效果 白萍
- nagu7508096952016-05-19很不合适我的需求
- broook2016-01-13很不合适我的需求
码农豆芽
- 粉丝: 0
- 资源: 4
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功