How to from viewController to NavigationController?

Joined
Jul 13, 2013
Messages
1
Reaction score
0
Points
1
Hi everyone. I'm new to objective c but I think I know what I'm doing wrong, I just does not know how to fix it.

I'm using xcode 4.6.3, using storyboards

The problem:

I have an initial viewController. In this view controller I have a picker View and a button.

Based on what the user chooses I want that he goes to ViewController A or ViewController B.

Until here, everything is fine, I know how to do this. The problem is I want that the View Controller B be managed by an Navigation Controller. So instead instanciate the ViewController B, I should instanciate the navigation Controller.

To call the ViewController B I'm using:

----

AgeViewController *ageViewController = [self.storyboard instantiateViewControllerWithIdentifier:mad:"AgeViewController"];

[self presentViewController:ageViewController animated:YES completion:nil];

----

Could someone help me?

Thanks in advance!
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top