如果我沒有錯,這應該和Mac OS上的一樣。你需要添加一個CFBundleDocumentTypes
項目到你的info.plist。詳情請參閱here。這是一個例子:
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeIconFiles</key>
<array>
<string>ICON_FILE_NAME</string>
</array>
<key>CFBundleTypeName</key>
<string>DESCRIPTIVE NAME like PDF document</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSItemContentTypes</key>
<array>
<string>DOCUMENT_TYPE_UTI</string>
</array>
</dict>
</array>
所有可用的尿路感染的名單可以發現here。在你的情況下,你應該使用com.adobe.pdf
。我認爲,所有這一切都然後離開是實現應用程序委託- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url
和處理開放有...
你爲什麼要刪除昨天的貼子,或多或少問這是通過提供一個鏈接到回答同樣的問題在蘋果文檔中的部分顯示瞭如何做到這一點? – falconcreek 2010-09-22 13:22:22