iphone - Cannot add icon to registered document type? Is this a bug? -
i trying add icons document type have defined using xcode document type option on project info.
see phrase add icons here
? in theory can drop icons area. have tried png, ico, icns. nothing.
i have tried add icons clicking on +
there, nope. click on +
, choose files , nothing happens.
the icon see there able drop place is, droppable place.
my problem this:
- i have dropped 320x320 png place see icon.
i use following code obtain icon @ run time , display it.
uidocumentinteractioncontroller* doccontroller = [[uidocumentinteractioncontroller alloc] init]; doccontroller.name = [nsstring stringwithformat:@"x.%@", [[fileurl path] pathextension]]; // x, can nsarray *icons = (nsarray *)[doccontroller icons];
the array has 2 icons, both same size 37x48 in size (???!!!)
two questions
- can confirm if bug , there no way add icons there?
- can confirm if code have use icon?
apple documentation vague. don't know if these icons have have special nomenclature. big icon bigicon.png
, small 1 smallicon.png
.
required icon sizes are
- ipad 320x320, 64x64
- iphone 44x58, 22x29
you have modify .plist manually (i didn't find way yet)
<key>cfbundledocumenttypes</key> <array> <dict> <key>cfbundletypeiconfiles</key> <array> <string>icon320x320.png</string> <string>icon64x64.png</string> <string>icon44x58.png</string> <string>icon22x29.png</string> </array> <key>cfbundletypename</key> <string>mydocumenttype</string> <key>cfbundletyperole</key> <string>viewer</string> <key>lshandlerrank</key> <string>owner</string> <key>lsitemcontenttypes</key> <array> <string>xyz.mydocument.uti</string> </array> </dict> </array>
Comments
Post a Comment