UINavigationControllerの利用手順


UINavigationControllerを使うには、「事前に」中に表示するViewControllerを作っておく必要があります。UINavigationControllerのコンテンツ部分にはrootViewControllerが表示されるのですが、この値は変更できません。そのため、UINavigationControllerを使う場合は、内包するViewControllerを作成しておいて、initWithRootViewController:で初期化します。

UIViewController * innerCtr = [[QuizScrollController alloc] init];
UINavigationController * navCtr = [[UINavigationController alloc] initWithRootViewController:innerCtr];

UIViewController Class Reference

Comments

comments

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です