方法一:打開Storyboard移動起始指標,指到的Controller預設就會用那個ViewController為起始頁面
- 方法二:
先對在Storyboard的Controller設定Storyboard ID
然後找到AppDelegate.swift檔案改寫didFinishLaunchingWithOptions ```swift
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { let storyboard = UIStoryboard(name:”Main” , bundle: nil);
self.window? = UIWindow(frame: UIScreen.mainScreen().bounds);
//指定Storyboard ID
self.window?.rootViewController = storyboard.instantiateViewControllerWithIdentifier(“testa”) as? UIViewController;
self.window?.makeKeyAndVisible();
return true
}