How to set tab-bar image
I have a tab bar in my application and that how I am customizing it
home_view_controleller * home_controller = [[[home_view_controleller alloc]init] autorelease];
NSArray *viewControllers = [NSArray arrayWithObjects:h开发者_JS百科ome_controller, detailController2, detailController3,detailController4,detailController5,nil];
[tabBarController1 setViewControllers:viewControllers animated:YES];
as home_controller
extend UIViewController
. How I can set its tabBarItem.image
before adding it to viewControllers
array?
You should set the view controller's tabBarItem
.
home_controller.tabBarItem = [[[UITabBarItem alloc] initWithTitle:myTitle image:myImage tag:myTag] autorelease];
精彩评论