未调用 willFinishLaunchingWithOptions
willFinishLaunchingWithOptions not called
我的应用程序有一个应用程序委托,我已经把我需要的代码放在委托中的以下方法下:
func application(_ application: UIApplication,
willFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool{
let storyboard: UIStoryboard = UIStoryboard(name: "Main", bundle: nil)
let initialFrontViewController: ViewController2 = storyboard.instantiateViewController(withIdentifier: "initialFrontRevealController") as! ViewController2
let revealController: RevealViewController = storyboard.instantiateViewController(withIdentifier: "revealVC") as! RevealViewController
revealController.setFront(initialFrontViewController, animated: true)
print("seen command")
return true
}
我的问题是我的打印语句没有打印到控制台,我在方法中放置的 none 任务实际上在我构建和 运行 我的应用程序时生效.
到目前为止,我已经尝试了多种内容和设置重置,但都无济于事。任何帮助将不胜感激。
将代码"print("seen command")"
更改为fund中的第一行
application(_ application: UIApplication, willFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool
观察是否有打印日志,目前的方法不能运行出代码错误。
我的应用程序有一个应用程序委托,我已经把我需要的代码放在委托中的以下方法下:
func application(_ application: UIApplication,
willFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool{
let storyboard: UIStoryboard = UIStoryboard(name: "Main", bundle: nil)
let initialFrontViewController: ViewController2 = storyboard.instantiateViewController(withIdentifier: "initialFrontRevealController") as! ViewController2
let revealController: RevealViewController = storyboard.instantiateViewController(withIdentifier: "revealVC") as! RevealViewController
revealController.setFront(initialFrontViewController, animated: true)
print("seen command")
return true
}
我的问题是我的打印语句没有打印到控制台,我在方法中放置的 none 任务实际上在我构建和 运行 我的应用程序时生效.
到目前为止,我已经尝试了多种内容和设置重置,但都无济于事。任何帮助将不胜感激。
将代码"print("seen command")"
更改为fund中的第一行
application(_ application: UIApplication, willFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool
观察是否有打印日志,目前的方法不能运行出代码错误。