私はpdfファイルで動作するアプリを持っています。私はのUITableViewControllerを持っていると(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
で、私はCFBundleTypeIconFiles
にアイコンでcell.imageView.image
を設定したい私のアプリで実行時にCFBundleTypeIconFiles情報を取得するにはどうすればよいですか?
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeIconFiles</key>
<array>
<string>iconPDF</string>
</array>
<key>CFBundleTypeName</key>
<string>PDF</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>com.adobe.pdf</string>
</array>
</dict>
</array>
が、私はこのアイコンを取得する方法がわからない:私は、ファイルのInfo.plistでこれを追加しました。 docInteractionController.icons
で試しましたが、この配列ではデフォルトのアイコンしか見つかりませんでした。
答えてくれてありがとう!しかし、複数のドキュメントタイプがある場合は、たとえば、pdfドキュメントのCFBundleIconFileとjpgドキュメントのCFBundleIconFileを区別する方法があります。 – Giorgio
その他のドキュメントタイプ1つのアプリにつき1つのInfo.plistが必要です。 – steipete