2
我希望每个人都可以explane我如何做到这一点:加入UITabBarItems到UITabBar
我有一个的TabBar和两个TabBarItems,我怎么能attatch该项目的TabBar。 我不是通过IB来做这件事,因为TabBar只适用于屏幕,因为项目应该在左侧。
这就是我如何建立他们:
tabBarController = [[UITabBarController alloc] initWithNibName:nil bundle:nil];
tabBarController2 = [[UITabBarController alloc] initWithNibName:nil bundle:nil];
tabBarController.tabBar.frame = CGRectMake(0, 974, 384, 50);
tabBarController2.tabBar.frame = CGRectMake(384, 974, 384, 50);
UITabBarItem *tbi1 = [[UITabBarItem alloc] initWithTabBarSystemItem:UITabBarSystemItemMostViewed tag:0];
UITabBarItem *tbi2 = [[UITabBarItem alloc] initWithTabBarSystemItem:UITabBarSystemItemMostViewed tag:1];
我已经试过,但它没有为我工作,但这是我的第二个TabBar造成的。 – Frank 2010-12-01 18:04:49