开发者

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];
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜