2011年4月3日日曜日

ModalViewにNavigationControllerを追加する方法

通常のモーダルは

ModalView* dialog = [[[ModalView alloc] init] autorelease];
dialog.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
[self presentModalViewController:dialog animated:YES];


でモーダルに推移する。
このモーダルにナビゲーションバーを追加表示する。
方法は超簡単。

ModalView* dialog = [[[ModalView alloc] init] autorelease];
dialog.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
UINavigationController *NavigationController =
[[UINavigationController alloc] initWithRootViewController:dialog];
[self presentModalViewController:NavigationController animated:YES];



参考間違いだらけの iPhone 開発備忘録

0 件のコメント:

コメントを投稿