ViewControllerにIDを設定
初回起動時の候補のViewControllerにIDを設定
スクリーンショット 2015-01-21 18.09.18.png
AppDelegateに分岐処理を記述
処理をappDelegateに記述
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
var flg = true //分岐条件
var storyboard:UIStoryboard = UIStoryboard(name: "Main",bundle:nil)
var viewController:UIViewController
//表示するビューコントローラーを指定
if flg {
viewController = storyboard.instantiateViewControllerWithIdentifier("firstViewController") as UIViewController
} else {
viewController = storyboard.instantiateViewControllerWithIdentifier("secondViewController") as UIViewController
}
window?.rootViewController = viewController
return true
}