分配给只读属性

时间:2013-06-25 09:41:08

标签: viewcontroller tabview

这已经很好地工作了大约4个小时,我甚至没有触摸它,但现在我得到一个只读属性和_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];

}

0 个答案:

没有答案