这已经工作了大约 4 个小时,我什至没有碰它,但现在我得到了 readonly 属性和 _tabBarController 的分配?你是说 UITabBarController 吗?我所做的是从 appdelegate 获取这个,因为我添加了一个登录屏幕,在登录屏幕上我没有对其进行编码,所以我只是让登录屏幕上的提交按钮运行我的应用程序的 tabview 部分。所以我不知道我做了什么,我说它已经这样工作了很长时间。有人有想法么?
- (IBAction)submit:(id)sender
{
UIViewController *viewController1 = [[[FirstViewController alloc] initWithNibName:@"FirstViewController" bundle:nil] autorelease];
UIViewController *viewController2 = [[[SecondViewController alloc] initWithNibName:@"SecondViewController" bundle:nil] autorelease];
UIViewController *viewController3 = [[[AlarmViewController alloc] initWithNibName:@"AlarmViewController" bundle:nil] autorelease];
UIViewController *viewController4 = [[[BusPassViewController alloc] initWithNibName:@"BusPassViewController" bundle:nil]autorelease];
self.tabBarController = [[[UITabBarController alloc] init] autorelease];
self.tabBarController.viewControllers = @[viewController1, viewController2, viewController3, viewController4];
[self presentViewController:_tabBarController animated:YES completion:nil];
}