既然你用的是SpriteKit,我想应该是
state
你提供的电话正在
didMove(to:)
GameScene.swift
. 如果是这种情况,那么您没有遇到问题,而是遇到了所需的结果;当场景调用
滴漏(到:)
方法。
AppDelegate.swift
:
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
print("app finished launching")
return true
}
func applicationDidEnterBackground(_ application: UIApplication) {
print("app in background")
}
func applicationWillEnterForeground(_ application: UIApplication) {
print("app in foreground")
}