Help us understand the problem. What is going on with this article?

AppDelegate,UIViewController,UIViewのライフサイクル/iOS/Swift

AppDelegate.swift

    func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
        // Override point for customization after application launch.
        return true
    }

    func applicationWillResignActive(application: UIApplication) {
        print("AppDelegate/WillResignActive/アプリ閉じる前")
    }

    func applicationDidEnterBackground(application: UIApplication) {
        print("AppDelegate/DidEnterBackground/アプリを閉じた時")
    }

    func applicationWillEnterForeground(application: UIApplication) {
        print("AppDelegate/WillEnterForeground/アプリを開く前")
    }

    func applicationDidBecomeActive(application: UIApplication) {
        print("AppDelegate/DidBecomeActive/アプリを開いた時")
    }

    func applicationWillTerminate(application: UIApplication) {
        print("AppDelegate/WillTerminate/アプリ終了時(フリック)")
    }

UIViewController

 override func viewDidLoad() {
  super.viewDidLoad()
  print("ViewController/viewDidLoad/インスタンス化された直後(初回に一度のみ)")

 }

 override func viewWillAppear(animated: Bool) {
  super.viewDidDisappear(animated)
  print("ViewController/viewWillAppear/画面が表示される直前")
 }

 override func viewDidAppear(animated: Bool) {
  super.viewDidAppear(animated)
  print("ViewController/viewDidAppear/画面が表示された直後")
 }

 override func viewWillDisappear(animated: Bool) {
  super.viewWillDisappear(animated)
  print("ViewController/viewWillDisappear/別の画面に遷移する直前")
 }

 override func viewDidDisappear(animated: Bool) {
  super.viewDidDisappear(animated)
  print("ViewController/viewDidDisappear/別の画面に遷移した直後")
 }

 override func didReceiveMemoryWarning() {
  super.didReceiveMemoryWarning()
  print("ViewController/didReceiveMemoryWarning/メモリが足りないので開放される")
 }



UIView

override func willMoveToSuperview(newSuperview: UIView?) {
    print("UIView/willMoveToSuperview/新しいSuperviewに対してaddSubviewされる前")
}

override func didMoveToSuperview() {
    print("UIView/didMoveToSuperview/新しいSuperviewにaddSubviewされた時")
}

override func willMoveToWindow(newWindow: UIWindow?) {
    print("UIView/willMoveToWindow/新しいWindowに対してaddSubviewされる前")
}

override func didMoveToWindow() {
    print("UIView/didMoveToWindow/新しいWindowに対してaddSubviewされた時")
}

override func didAddSubview(subview: UIView) {
    print("UIView/didAddSubview/自分自身に他のviewがsubviewとして追加されたとき")
}

override func willRemoveSubview(subview: UIView) {
    print("UIView/willRemoveSubview/自分自身のsubviewsから他のviewが取り除かれようとしているとき")
}


android版

https://qiita.com/kayo_h/items/5c76eb124b90feb66c58

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした