tags:

views:

269

answers:

1

I saved an image from a website by right clicking. The image was a UITabBar Imange and was supposed to to work on UITabBar but its just showing me a square when I run the application. Can Anyone Tell me why is it not working.

Interface builder do provide some images for UITabBar. Where are they stored and how can I access them.

A: 

If I understand you correctly, you want to know how to get things like the star for Favorites or the magnifying glass for Search. Is that correct?

To do it in code, use this UITabBarItem function:

- (id)initWithTabBarSystemItem:(UITabBarSystemItem)systemItem tag:(NSInteger)tag;

where systemItem is one of these:

UITabBarSystemItemMore
UITabBarSystemItemFavorites
UITabBarSystemItemFeatured
UITabBarSystemItemTopRated
UITabBarSystemItemRecents
UITabBarSystemItemContacts
UITabBarSystemItemHistory
UITabBarSystemItemBookmarks
UITabBarSystemItemSearch
UITabBarSystemItemDownloads
UITabBarSystemItemMostRecent
UITabBarSystemItemMostViewed

To do it in Interface Builder (which I don't use myself), add the UITabBar and then a UITabBaritem; then select the type of the bar item from Tab BarItem Attributes:BarItem in the Inspector.

Creating UITabBars is actually pretty complex. Read the documentation carefully and look at the tutorials. If you are confused, you are not alone. (And learn the difference betwen a UIToolbar (which let's the user take actions) and a UITabBar (which let's the user change what they are looking at or how the information is displayed.)

Note: Be very careful using the custom items. Do NOT, for example, use the Search icon to mean "show the same data but with a larger font size". Your application will be rejected if you do that.

Amagrammer