Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
macOS & iOS Developer Playground
iOS Development
How to from viewController to NavigationController?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="fabiohenrique" data-source="post: 1526064" data-attributes="member: 306677"><p>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.</p><p></p><p>I'm using xcode 4.6.3, using storyboards</p><p></p><p>The problem:</p><p></p><p>I have an initial viewController. In this view controller I have a picker View and a button.</p><p></p><p>Based on what the user chooses I want that he goes to ViewController A or ViewController B.</p><p></p><p>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.</p><p></p><p>To call the ViewController B I'm using:</p><p></p><p>----</p><p></p><p>AgeViewController *ageViewController = [self.storyboard instantiateViewControllerWithIdentifier<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite4" alt=":mad:" title="Mad :mad:" loading="lazy" data-shortname=":mad:" />"AgeViewController"];</p><p> </p><p>[self presentViewController<img src="/images/smilies/angel.gif" class="smilie" loading="lazy" alt=":a" title="Angel :a" data-shortname=":a" />geViewController animated:YES completion:nil];</p><p></p><p>----</p><p></p><p>Could someone help me?</p><p></p><p>Thanks in advance!</p></blockquote><p></p>
[QUOTE="fabiohenrique, post: 1526064, member: 306677"] 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:@"AgeViewController"]; [self presentViewController:ageViewController animated:YES completion:nil]; ---- Could someone help me? Thanks in advance! [/QUOTE]
Verification
Post reply
Forums
macOS & iOS Developer Playground
iOS Development
How to from viewController to NavigationController?
Top