You can use this piece of code to set which view controller you want to be the first view controller that gets displayed at launch for AppDelegate.h. Just remember to edit the Storyboard ID for your view controllers in Main.storyboard and adjust the strings accordingly
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
let storyboard = UIStoryboard(name: "MainStoryboard", bundle: NSBundle.mainBundle())
let defaults = NSUserDefaults.standardUserDefaults()
var rootViewController : UIViewController;
if (defaults.boolForKey("HasBeenLaunched")) {
// This gets executed if the app has ALREADY been launched
rootViewController = storyboard.instantiateViewControllerWithIdentifier(/*storyboard id of your login controller*/) as UIViewController
} else {
// This gets executed if the app has NEVER been launched
defaults.setBool(true, forKey: "HasBeenLaunched")
defaults.synchronize()
rootViewController = storyboard.instantiateViewControllerWithIdentifier(/*storyboard id of your configuration controller*/) as UIViewController
}
self.window?.rootViewController = rootViewController;
self.window?.makeKeyAndVisible();
return true
}
This function gets called as soon as your application is finished launching and is about to display its initial view controller. To get a better understanding of what the if is checking for check the documentation for NSUserDefaults (it's a really useful class). The last two statements before the return do is basically displaying the view controller that has been selected inside the if.
Hope this helps.