I would like to use the standard icons like search, download, contact, setup, and list. Most of them existing in app like App Store, but I am not sure how to retrieve them.
Thanks
See here: http://www.alexcurylo.com/blog/2009/01/03/extracting-sdk-icons/
For example, let’s decide we would like to have a camera image on one of our tabs. So we dig through the simulator resources, which are found at
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator2.0.sdk/System/Library
and we find one that looks like what we want, inside the above at
/PrivateFrameworks/PhotoLibrary.framework/CameraIcon.png
But wait, it’s not quite that easy! All the allegedly PNG images in the simulator SDK are actually in Apple’s wacky iPhone variation of the PNG format, so we have to deal with that somehow...
[UPDATE: Or, on the other hand, using a camera icon for a camera-related function could actually in Apple’s eyes turn out to be a big bundle of FAIL. So be careful with how you use these icons, kids!]
Not sure if you can do this in Interface Builder, but you can certainly use "system" icons programatically, for example:
[[UITabBarItem alloc] initWithTabBarSystemItem:UITabBarSystemItemDownloads tag:0];
There are a number of other icons:
typedef enum {
UITabBarSystemItemMore,
UITabBarSystemItemFavorites,
UITabBarSystemItemFeatured,
UITabBarSystemItemTopRated,
UITabBarSystemItemRecents,
UITabBarSystemItemContacts,
UITabBarSystemItemHistory,
UITabBarSystemItemBookmarks,
UITabBarSystemItemSearch,
UITabBarSystemItemDownloads,
UITabBarSystemItemMostRecent,
UITabBarSystemItemMostViewed,
} UITabBarSystemItem;
If you want any others I guess you'll have to draw them yourself!
And once more, visually: In Interface Builder, select your Tab Bar or Toolbar item and then bring up the Attributes tab in the Inspector (⌘1) and under Identifier, select the system icon you want to use.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With