0
我藏我的第一个标签栏,现在我想添加另一个标签栏在我的下一个view.Please帮我在这写的代码编程如何添加标签栏编程
我藏我的第一个标签栏,现在我想添加另一个标签栏在我的下一个view.Please帮我在这写的代码编程如何添加标签栏编程
UITabBarController *tabView=[[UITabBarController alloc] init];
tabView.view.frame=CGRectMake(0,0,screenRect.size.width, screenRect.size.height);
NSMutableArray *arrToAddView =[[NSMutableArray alloc]init];//array to store tab's view
for (int i=0;i<5;i++)
{
UIViewController *viewForTab = [[UIViewController alloc] init];
viewForTab.view.backgroundColor = [UIColor whiteColor];
[arrToAddView addObject:viewForTab];
}
[tabView setViewControllers:arrToAddView];
[self.view addSubview:tabView.view];
感谢ü非常 – ask123 2010-12-13 12:30:07