开发者

CocoaTouch: are there stock icons available when creating a UIImage (file, folder, etc)

Are there any stock images that come with the system that I can use to fill a UIImage? For example, if I want a picture of a folder, do I have to include the image with my app? Or is the开发者_JAVA技巧re a system wide folder image I can load/display.


This terminal command get the images (Xcode 4.3) and copy them directly where you ned them:

find /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk -iname '*.png' -exec cp '{}' ~/Desktop/folder/ ";"

You can also specify every other SDK you want.


Yes and no.

There are a lot of images in the system already. A lot are in ".artwork" files, which appear to raw be RGBA data with no metadata. The rest tend to be PNGs. You can find most of them bundled with the simulator (find /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk -iname '*.png'); you'll probably have to un-iPhoneize them with pngcrush -revert-iphone-optimizations to view them.

It is unwise to use them directly. They're for use by the frameworks, not you; there's no guarantee that they won't be removed between OS releases. While they're technically under Apple copyright, I don't think you're likely to get in trouble for bundling them with your app (just make sure you don't use them in an Android app, for example).

MobileSafari.app has a folder icon (it might be the same one MobileMail.app uses). I'm not aware of any file icon.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜