Someone help me understand the new storyboard in Xcode 4.2?
I know how to code to load another view controller but in the storyboard mode there are differences..
I also know there are a lot of tutorials about the navigationcontrollers, but I just want to switch UIViewControllers on storyboard.
With the normal .xib files I can switch views with this code from the RootViewController..
SecondViewController *Second = [[SecondViewController alloc] initWithNibName:nil bundle:nil]; [self presentModalViewController:Second animated:YES];
When I use it in the storyboard mode it just loads the UIAlertView on the SecondViewController.m and the screen appears to be black?
Any help would be appreciated, also attached the Xcode project…
-x- Jay Ruben
you can do this:
Don’t forget to give the second view controller an identifier like “second”.
Otherwise you can connect both view controllers with a segue. Hold CTRL an drag from the first to the second view Controller. Now you can choose “push” and give the segue a name to switch the View programmatically like this:
Push Segues will only work if a navigation controller is set.