html
iphone
ajax
python
mysql
database
xcode
android
ruby-on-rails
regex
multithreading
facebook
oracle
cocoa
tsql
delphi
php5
asp
dom
starting from scratch is a good idea. You have more control over whats going on IMO. At your starting point you want to add your LoginViewController.
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; self.loginController = [[LoginViewController alloc] initWithNibName:@"LoginViewController" bundle:nil]; self.window.rootViewController = self.viewController; [self.window makeKeyAndVisible]; return YES; }
Later when the authentication process has finished you want to continue with SplitView, right?
- (void)continueWithSplitView { UINavigationController *leftNav = [[UINavigationController alloc] initWithRootViewController:self.masterViewController]; UINavigationController *rightNav = [[UINavigationController alloc] initWithRootViewController:self.detailViewController]; self.splitViewController.viewControllers = [NSArray arrayWithObjects:leftNav, rightNav, nil]; self.view.window.rootViewController = self.splitViewController; }
Notice that in both methods your desired viewController is set as the rootViewController property of UIWindow. This will automatically add the view of your controller as the top level view in UIWindow.
Furthermore make sure that you are following the MVC pattern e.g. a model object for your credentials organisation.