Skip to content

Instantly share code, notes, and snippets.

@TechMaster
Created July 3, 2017 08:29
Show Gist options
  • Select an option

  • Save TechMaster/e7fe78447a216cace1838341e62e6d84 to your computer and use it in GitHub Desktop.

Select an option

Save TechMaster/e7fe78447a216cace1838341e62e6d84 to your computer and use it in GitHub Desktop.
UIViewController life cycle
import UIKit
class ViewController: UIViewController {
override func loadView() {
print("loadView")
}
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
print("viewWillAppear")
}
override func viewWillLayoutSubviews() {
}
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
print("viewDidAppear")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment