林在IOS新手viewbased应用,我的应用程序是单个视图应用(笔尖),所述第一视图有2个按钮,第一个打开一个UIView与4个按钮,每个按钮打开的TabBar,(那意味着4个栏按钮项目),与tabbarcontroller
的意见了显示OK
在第一个视图的第二个按钮中,一个视图用3个按钮显示每个按钮打开一个tabbar(这意味着3个bar按钮项),当我按下这3个按钮之一时,应用程序崩溃,显示错误([UITabBarController presentModalViewController:animated:completion:]:无法识别的选择器发送到实例..)
我在第二个酒吧做了一步,就像我在第一个做的那样!
-(IBAction)goabout{
UIViewController *view1 = [[[about alloc] initWithNibName:@"about" bundle:nil] autorelease];
UIViewController *view2 = [[[collages alloc] initWithNibName:@"collages" bundle:nil] autorelease];
UIViewController *view3 = [[[centers alloc] initWithNibName:@"centers" bundle:nil] autorelease];
self.tabBarControllerr = [[UITabBarController alloc] init];
self.tabBarControllerr.viewControllers = [NSArray arrayWithObjects: view1, view2,view3, nil];
[self.tabBarController setSelectedIndex:0];
[self.tabBarControllerr presentModalViewController:tabBarControllerr animated:NO completion:nil];
}
请帮忙吗? 谢谢
什么是你想用做[self.tabBarControllerr presentModalViewController:tabBarControllerr动画:NO完成:零]它看起来像标签栏控制器试图呈现自己。 – rdelmar