標準のFlipside Viewの中にナビゲーションビューを作成して設定を読み込んで更新する方法を知っている人はいますか?もしそうなら、あなたはこれを行う上でいくつかのコードを投稿できますか?標準のFlipsideビュー内にナビゲーションビューを作成しますか?
1
A
答えて
0
flipsideにUINavigationControllerのサブクラスを表示させることができます。
または、新しいビューコントローラをプッシュ/ポップする必要なくナビゲーションバーが必要な場合は、NIBからフリップサイドビューが読み込まれているので、NIBファイルにナビゲーションバーを追加するだけです。
0
アプリケーションデリゲートのヘッダファイル(MyAppDelegate.h):
@interface MyAppDelegate : NSObject <UIApplicationDelegate> {
IBOutlet UIWindow *window;
// We're assuming the root view for the main view is connected to this outlet of the app delegate
// It'll probably have a different class than UIViewController in your app
IBOutlet UIViewController *mainViewController;
UINavigationController *settingsNavigationController;
}
// Other view controllers can do [(MyAppDelegate *)[UIApplication sharedApplication].delegate showSettings] to show the settings
- (void)showSettings;
- (void)hideSettings;
@end
アプリケーションデリゲートの.mファイル(MyAppDelegate.m):
- (void)showSettings
{
// Load the settings view controller the first time it's needed
// We're assuming you created the root view controller for the settings in a nib called SettingsRootViewController.xib. You might also just create the root view programmatically (maybe by subclassing UITableViewController)
if(settingsNavigationController == nil)
{
SettingsRootViewController *settingsRootViewController = [[[SettingsRootViewController alloc] initWithNibName:@"SettingsRootViewController" bundle:nil] autorelease];
settingsNavigationController = [[UINavigationController alloc] initWithRootViewController:settingsRootViewController];
settingsNavigationController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal
}
[rootViewController presentModalViewController:settingsNavigationController animated:YES];
}
- (void)hideSettings
{
[settingsNavigationController dismissModalViewController:YES];
}
関連する問題
- 1. iOSアプリケーションの作成時に標準にコメントしますか?
- 2. 標準トピックの作成
- 3. ASP MVC標準ビュー
- 4. カスタム非標準フィールドを作成する
- 5. C標準ライブラリの内部作業
- 6. フローチャート作成Webサイトの標準はありますか?
- 7. iPhone標準アドレスのようなビューを表示しました。
- 8. Qt作成者の標準ヘッダーが見つかりません
- 9. 標準の動作
- 10. スレッド内にスレッドを生成するのが標準か悪いのですか?
- 11. Django:ビュー内にQuerySetを作成しますか?
- 12. mingW内の標準Cライブラリ
- 13. ClearCase UCMでのアクティビティ作成の標準ガイドラインは何ですか?
- 14. iPhone Flipsideテンプレート(ユーティリティアプリケーション):ビューはどこから来たのですか?
- 15. sqliteのは:moveToFirstは標準SQLiteのカーソルを作成した後
- 16. 標準mlリストからbstを作成する
- 17. CSSのregexはW3C標準に準拠していますか?
- 18. C++標準コンストラクタを生成
- 19. 標準で事前に連絡先を作成するアクティビティ
- 20. Cの成熟標準ライブラリ
- 21. 標準的な新しいペアを作りますか?
- 22. ライブラリ作成:標準的なソリューションですか?
- 23. ビュー内でナビゲーションコントローラを作成
- 24. 異なるデータシートビューと標準ビュー
- 25. OpenSSLシェル標準からSHAハッシュを作成
- 26. "#"の代わりに標準に準拠した空のsrcを使ってiframeを作成する
- 27. iPhoneのインフォメーションボタンディスプレイの標準ビューとは何ですか?
- 28. このRegExpは動作しません。どの表記が標準に準拠していますか?
- 29. IDとタイトルを含む標準URLを作成するslug
- 30. 標準htmlタグを持つパネルを作成する
は本当に素晴らしい解決策のように思えます!しかし、私はそれを動作させるトラブルを抱えています。 'rootViewController'とは何ですか?私はそれがルートのビューコントローラであるとは思いますが、何とか最初に実装されるべきではないでしょうか?そして、私はあなたのようなメソッドを '[(MyAppDelegate *)[UIApplication sharedApplication] .delegate showSettings]'と書いて問題を抱えています。私はUIApplication.sharedApplication.delegate.showSettingsでそれを切り替えようとしましたが、まだ運が無ければ...あなたが助けてくれることを願っています。 –