0

TabBarControllerに4つのTabがある。私はタブからViewControllerを押すと、タブは自動的に隠され、Viewには何も表示されません。しかし、ViewControllerにはデータ付きのテーブルビューが含まれています。私もtableviewデリゲートを実装しています。私はtableviewデリゲートログを取得していません。 appdelegate didFinishLaunchingWithOptions()でiOS 9.0 Tabbarが自動的に非表示になり、viewcontrollerがプッシュで消える

self.window = [[UIWindow ALLOC] initWithFrame:[UIScreen mainScreen]境界]。ここ

負荷にTabBar:タブ4から

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]; 

、私は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で。いいえ、うまくいきません。私は空白の白い画面が表示されます。

+0

に役立つかもしれないあなたのクエリに関連するソリューションとは? – vaibhav

+0

@jamshedあなたのアプリの構造の詳細を共有できますか?あなたのアプリでUINavigationControllerを使用していますか? –

+0

あなたはストーリーボードを共有できますか? –

答えて

0
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"]; 




UINavigationController *nav1 = [[UINavigationController alloc] initWithRootViewController:tab1]; 

UINavigationController *nav2 = [[UINavigationController alloc] initWithRootViewController:tab2]; 

UINavigationController *nav3 = [[UINavigationController alloc] initWithRootViewController:tab3]; 

UINavigationController *nav4 = [[UINavigationController alloc] initWithRootViewController:tab4]; 

myAppDelegate.myTabBarController.viewControllers = [NSArray arrayWithObjects:nav1,nav2,nav3,nav4,nil]; 
[myAppDelegate.rootNav pushViewController:myAppDelegate.myTabBarController animated:YES]; 

and then later on to push your vc to tab 4 you should do 

Profile_ViewController *vc = [[Profile_ViewController alloc] initWithNibName:@"Profile_ViewController" bundle:[NSBundle mainBundle]]; 
[nav4 pushViewController:vc animated:YES]; 

あなたは4タブのいずれかから別のviewContにアプリを移動したいわけあなた

+0

はい。私はすでにそれをしました。私は2年前に同じ問題に直面したことを忘れてしまった。あなたの努力に感謝します。 –

+0

すべてのベスト:) –

0

ナビゲーションコントローラ--->タブバーコントローラ次のようにあなたは、あなたのアーキテクチャを保持しているかもしれない - > 4子ビューコントローラ

あなたはこの タブバーコントローラを行う必要があります - > 4つのコントローラを(各これらの4つの子View Controllerには独自のNavigation Controllerがあります)。ここ

+0

すでに追加されています。働いていない。タブバーはまだ隠れています。しかし、私は私のプッシュ画面を取得しています。 –

+0

いいえ、あなたの現在のアーキテクチャにはナビゲーションコントローラが1つしかありません。 4つの異なるナビゲーションコントローラが必要であると言っています(すべての4つのビューコントローラのナビゲーションコントローラ1つ) –

関連する問題