Reputation: 3071
My view contains a signup button which display signup view modally, I want this signup inside uinavigationcontroller, how can I add this view inside uinavcontroller.
Upvotes: 0
Views: 90
Reputation: 857
Just have your button's action method present the navigation controller like this:
-(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];
}
Upvotes: 2