I want to conditionally display the login screen when starting the ipad application. I do not want this to be part of the standard segue, as they should only be logged periodically, and not every time.
There are numerous examples of my question, but they all seem to precede ios5. However, when I use storyboards, nothing works.
To reduce this in essence, * create a new one-time application using the storyboard * add a new viewcontroller to the storyboard, give it the loginScreen identifier * place a text label on each view to visually distinguish them. * in appDelegate:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { UIStoryboard *storyboard = [self.window.rootViewController storyboard]; UIViewController *loginController = [storyboard instantiateViewControllerWithIdentifier:@"loginScreen"]; [self.window.rootViewController presentModalViewController:loginController animated:TRUE]; return YES; }
From what I saw in the examples, this should work. But it still constantly displays the original rootViewController view. There are no errors.
Can someone point out a (possibly small) thing that I will skip?
source share