Skip to content

Instantly share code, notes, and snippets.

@hehehaha0228
Created May 17, 2018 08:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hehehaha0228/c580d46fba826486f35c5d4f0e746e67 to your computer and use it in GitHub Desktop.
Save hehehaha0228/c580d46fba826486f35c5d4f0e746e67 to your computer and use it in GitHub Desktop.
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
print("1 didFinishLaunchingWithOptions 開始lunching")
return true
}
func applicationWillResignActive(_ application: UIApplication) {
print("2 applicationWillResignActive 將結束活動")
}
func applicationDidEnterBackground(_ application: UIApplication) {
print("3 applicationDidEnterBackground 進入後台")
}
func applicationWillEnterForeground(_ application: UIApplication) {
print("4 applicationWillEnterForeground 進入前端")
}
func applicationDidBecomeActive(_ application: UIApplication) {
print("5 applicationDidBecomeActive 已經活動")
}
func applicationWillTerminate(_ application: UIApplication) {
print("6 applicationWillTerminate 掰掰")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment