我有一个TabBarController与4选项卡。当我从一个标签中推一个ViewController时,该标签会自动隐藏,并且它在View中什么都不显示。但ViewController包含一个包含数据的表格视图。我也实现了tableview委托。我没有得到tableview委托日志。iOS 9.0 Tabbar自动隐藏和viewcontroller消失在推
中的appdelegate didFinishLaunchingWithOptions()self.window = [[ALLOC的UIWindow] initWithFrame:方法[[UIScreen mainScreen]界限]];
负载的TabBar这里:
myAppDelegate.myTabBarController.selectedIndex = 0;
myAppDelegate.myTabBarController.tabBar.translucent = NO;
myAppDelegate.myTabBarController.tabBar.opaque = YES;
location_select *tab1 = [[location_select alloc] initWithNibName:@"location_select" bundle:nil];
tab1.tabBarItem.image = [UIImage imageNamed:@"Restaurants.png"];
location_select *tab2 = [[location_select alloc] initWithNibName:@"location_select" bundle:nil];
tab2.title = @"Cart";
tab2.tabBarItem.image = [UIImage imageNamed:@"Cart.png"];
Deal_ViewController *tab3 = [[Deal_ViewController alloc] initWithNibName:@"Deal_ViewController" bundle:nil];
tab3.title = @"Deals";
tab3.tabBarItem.image = [UIImage imageNamed:@"Deals.png"];
MoreViewController *tab4 = [[MoreViewController alloc] initWithNibName:@"MoreViewController" bundle:nil];
tab4.title = @"More";
tab4.tabBarItem.image = [UIImage imageNamed:@"More.png"];
myAppDelegate.myTabBarController.viewControllers = [NSArray arrayWithObjects:tab1,tab2,tab3,tab4,nil];
[myAppDelegate.rootNav pushViewController:myAppDelegate.myTabBarController animated:YES];
由表4,我推Profile_ViewController:
Profile_ViewController *vc = [[Profile_ViewController alloc] initWithNibName:@"Profile_ViewController" bundle:[NSBundle mainBundle]];
[self.navigationController pushViewController:vc animated:YES];
并已我在那里应用:
myAppDelegate.myTabBarController.hidesBottomBarWhenPushed=NO;
and
[self.tabBarController setHidesBottomBarWhenPushed:NO];
在Profile_ViewController的viewWillAppear中。没有任何作品。我只看到一个空白的白色屏幕。
你的意思是你想你的应用程序从4选项卡上的一个导航到另一个viewCont? – vaibhav
@jamshed你可以分享更多关于你的应用程序结构的信息吗?你在你的应用中使用UINavigationController吗? –
你能分享故事板截图吗? –