私のビューには、サインアップビューをモーダルに表示するサインアップボタンが含まれています。このサインアップをuinavigationcontroller内に追加したいのですが、このビューをuinavcontroller内に追加するにはどうすればよいですか。
1 に答える
2
ボタンのアクションメソッドに、次のようにナビゲーションコントローラーを表示させるだけです。
-(IBAction)showSignup:(id)sender {
MyViewController *signupController = [[MyViewController alloc] init];
//Other setup for signupController;
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:signupController];
//Set modal presentation and transition styles, if needed.
[self presentModalViewController:navController animated:YES];
}
于 2012-07-16T13:51:59.683 に答える