一種是寫code:
class AppDelegate: UIApplicationDelegate{
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
if self.window?.rootViewController == nil{
let loginStoryboard = UIStoryboard(name: "xxx", bundle: nil)
let launchVC = loginStoryboard.instantiateViewController(withIdentifier: "LaunchVC") as! LaunchViewController
self.window?.rootViewController = launchVC
}
}
}
另外一種是直接在View Conroller上做設定,將is Initial View Controller勾起來即可:
沒有留言:
張貼留言
歡迎大家留言提問,我會答的都會盡力回答!
如果太久沒出現回應就是我又忘記回來看留言了TAT