をUIViewController
クラスのアプリケーションデリゲートに統合するにはどうすればよいですか?私はログインビューを作ろうとしていたのですが、その後にUIViewController
クラスで作成されたUITabBarController
が表示されますか?誰でも何をする必要があるのかを提案できますか?ログインが行われたときに感謝UIViewController内のUIViewController内にUitabbarcontrollerがありません
2
A
答えて
1
あなたはまだ、アプリケーションの委任にUITabBarController
を置くことができ、単にアプリのデリゲートを伝え、それらを切り替える:
self.window.rootViewController = tabBarController。あなたのアプリケーションは、ナビゲーションベースのアプリケーションであれば
-2
ここからconfigureMessagesTabBArController方法では、(あなたが追加したいどのように多くのViewControllers付き)TabBarControllerを作成し、この
UITabBarController *tabBarController = [Utility configureMessagesTabBArController];
self.navigationController.navigationBarHidden=YES;
[self.navigationController pushViewController:tabBarController animated:YES];
[tabBarController release];
のように、ナビゲーションコントローラにそれを追加ユーティリティクラス
+(UITabBarController *)configureMessagesTabBArController
{
UITabBarController *tabBarController = [[UITabBarController alloc]init];
AktuellesViewController *aktuelles_Controller = [[AktuellesViewController alloc]init];
TermineViewController *termine_Controller = [[TermineViewController alloc]init];
TopTenViewController *topTen_Controller = [[TopTenViewController alloc]init];
MediathekViewController *mediathek_Controller = [[MediathekViewController alloc]init];
KontaktViewController *kontakt_Controller = [[KontaktViewController alloc] init];
UINavigationController *nav1 = [[UINavigationController alloc]initWithRootViewController:aktuelles_Controller];
UINavigationController *nav2 = [[UINavigationController alloc]initWithRootViewController:termine_Controller];
UINavigationController *nav3 = [[UINavigationController alloc]initWithRootViewController:topTen_Controller];
UINavigationController *nav4 = [[UINavigationController alloc]initWithRootViewController:mediathek_Controller];
UINavigationController *nav5 = [[UINavigationController alloc]initWithRootViewController:kontakt_Controller];
nav1.navigationBar.tintColor = [UIColor blackColor];
nav2.navigationBar.tintColor = [UIColor blackColor];
nav3.navigationBar.tintColor = [UIColor blackColor];
nav4.navigationBar.tintColor = [UIColor blackColor];
nav5.navigationBar.tintColor = [UIColor blackColor];
[tabBarController setViewControllers:[[NSArray alloc]initWithObjects:nav1,nav2,nav3,nav4,nav5,nil]];
[nav1 release];
[nav2 release];
[nav3 release];
[nav4 release];
[nav5 release];
[aktuelles_Controller release];
[termine_Controller release];
[topTen_Controller release];
[mediathek_Controller release];
[kontakt_Controller release];
return tabBarController;
}
+0
まず、上記は元の質問には答えません。第二に、テキストはコードが何をしているかを正確には言いません。このコードはナビゲーションコントローラをタブに追加しています。 – ader
関連する問題
- 1. UIViewController = viewDidAppear内のUITabBarController:
- 2. UIViewControllerのビュー内のオブジェクトのy位置が正しくありません
- 3. TableView内のUIViewController
- 4. UICollectionView内のUIViewController
- 5. UITabBarControllerのUIViewControllerは黒です
- 6. UIViewController内のPullRefreshTableViewControllerサブクラス
- 7. UIViewController内のUIViewController - IBActionが起動しない
- 8. iPhone/iPad UINavigationControllerプロパティはUIViewController内にありますか?
- 9. UIViewController - addSubviewは動作しますがpresentModalViewControllerはありません
- 10. 別のUIViewController内部からUIViewControllerを表示しますか?
- 11. UIViewController内のルートViewControllerは回転しません
- 12. 別のUIViewControllerのビューを「メイン」UIViewController内に置く - デリゲートメソッド
- 13. iPhone UINavigationControllerの内部のUIViewController
- 14. UIViewController内にUINavigationControllerを追加します。
- 15. 他のUIViewController内のプロパティとしてUIViewControllerを設定する
- 16. モーダルUIViewControllerが表示されません
- 17. タイプ 'UIViewController'の値にJSONという名前のメンバ 'jsonfile'がありません
- 18. nibファイルをUIViewController内にロードする
- 19. UIViewController内にUIViewとGLKViewを統合
- 20. presentModalViewController UIViewController内のUITableViewからの親の
- 21. ビューの切り替え - UIViewControllerからUITabBarControllerへ
- 22. UITabBarController/UINavigationControllerタイトルがありません
- 23. UIViewControllerアプリケーションデリゲート内での手動インスタンシエーション
- 24. ファイル内にi386がありません
- 25. テーブル内にデータがありません
- 26. ビュー内にレコードがありません
- 27. 現時点では、UIViewControllerは、フルスクリーンをカバーしていないUIViewController内でモーダルになります。
- 28. UiViewController内にあるUItableViewをリロードする方法
- 29. UITabBarControllerアプリケーションの別のUIViewControllerからUISplitViewControllerを呼び出します
- 30. iOsのUIViewControllerにUITabbarControllerを追加するには
あなたはその先生のためのソースコードがありますか?ありがとう – Jahn
あなたはコードを必要としない、理解する必要があります。 AppDelegateに2つのIBOUtletを用意してください。 1つはログインUIViewController用、もう1つはUITabBarController用です。初めに、あなたのログインUIViewControllerにrootViewControllerがあります。それを済ませたら、UITabBarControllerのrootViewControllerを切り替えてください。 – Peres
UITabBarcontrollerはrootViewControllerにしかなりません.Appleでは他のコントローラの子としてtabBarControllerを使用することはできません。したがって、Jacky Boyが言うように、最初のオプションは、tabBarControllerの子として(モーダルまたはそれ以外の)ログインビューを持つ可能性があります。 – ader