Okay, so far I\'ve two view controllers in my storyboard. One with \"login\" elements and other as \"User\'s home\" sort of thing. I am intending to do the following : When user
Using storyboards you should be using:
UIViewController *homeView = [self.storyboard instantiateViewControllerWithIdentifier:@"someID"];
[self presentViewController:homeView animated:YES completion:NULL] ;
Then set the ID to the view controller in storyboard like so:
Additionally, if you wish to there is absolutely nothing wrong with designing your UI entirely in code. Personally I prefer it. It gives you much more flexibility than interface builder.
In addition to NSPostWhenIdle's suggestion of instantiateViewControllerWithIdentifier
, you can also define a segue between the two view controllers (not between the button and the second controller, but between the two view controllers):
Then give the segue a unique identifier, and then have your IBAction
method do a performSegueWithIdentifier
. This way your storyboard will continue to visually represent the various relationships between your view controllers.