【发布时间】:2012-02-14 02:32:33
【问题描述】:
我想以编程方式将标题设置为选项卡项,但它不起作用。我的代码如下:
- (IBAction)tab1Click:(id)sender {
myTabBarController = [[UITabBarController alloc] init];
view2Controller = [[View2Controller alloc] init];
[view2Controller setTitle:@"title"];
view3Controller = [[View3Controller alloc] init];
deneme = [[ViewController alloc] init];
myTabBarController.viewControllers = [NSArray arrayWithObjects:deneme, view2Controller,view3Controller, nil];
[self.view addSubview:myTabBarController.view];
myTabBarController.selectedIndex=1;
}
【问题讨论】:
-
我编辑了我的问题,请立即查看
标签: objective-c xcode uitabbarcontroller uitabbaritem