碰到一个问题,在AppDelegate中三句话:
window = UIWindow(frame: UIScreen.main.bounds)
window.rootViewController = FaceViewController()
window.makeKeyAndVisible()
这可以撇开storyboard,但没用,刷新了我的认识!原因原来在这,小问题,记录下。
有三个didFinishLauching:
//混淆视听的,已改名
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool {
print("Good!!")
return true
}
//正宫
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool {
window = UIWindow(frame: UIScreen.main.bounds)
window?.rootViewController = FaceViewController()
window?.makeKeyAndVisible()
return true
}
//已废用
func applicationDidFinishLaunching(_ application: UIApplication) {
print("okkk1")
}