I want to add UITabBarItem in programmatically in iOS.
In interface Builder,we can easily choose with Identifier for Search,Favourites,Recent Tabs,etc..
I would like to know how can i add these Identifier type in programatically?
I want to add UITabBarItem in programmatically in iOS.
In interface Builder,we can easily choose with Identifier for Search,Favourites,Recent Tabs,etc..
I would like to know how can i add these Identifier type in programatically?
You add it as a UIViewController's property?
You create a UITabBarItem
UITabBarItem *localTabBarItem = [[UITabBarItem alloc]
initWithTitle:@"Date" image:clockIcon tag:0];
And then set UIViewController's property
[viewController setTabBarItem:localTabBarItem];
Here is a huge pack of TabBar images http://www.axialis.com/objects/ip_icon_09.shtml
UITabBarItem *barItem = [[UITabBarItem] alloc] initWithTabBarSystemItem:UITabBarSystemItemMore tag:0];
self.tabBarItem = [barItem autorelease]; //of not using ARC
The predefined system bar items are:
UITabBarSystemItemMore,
UITabBarSystemItemFavorites,
UITabBarSystemItemFeatured,
UITabBarSystemItemTopRated,
UITabBarSystemItemRecents,
UITabBarSystemItemContacts,
UITabBarSystemItemHistory,
UITabBarSystemItemBookmarks,
UITabBarSystemItemSearch,
UITabBarSystemItemDownloads,
UITabBarSystemItemMostRecent,
UITabBarSystemItemMostViewed