Skip to content

Instantly share code, notes, and snippets.

@ha1f
Last active December 15, 2017 02:29
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 ha1f/2757e284b942419da182b15d6c3a74fd to your computer and use it in GitHub Desktop.
Save ha1f/2757e284b942419da182b15d6c3a74fd to your computer and use it in GitHub Desktop.
class PrintingViewController: UIViewController {
// Load
override func loadView() {
super.loadView()
print("lifecycle", #function)
}
override func viewDidLoad() {
super.viewDidLoad()
print("lifecycle", #function)
}
// Layout
override func viewWillLayoutSubviews() {
super.viewWillLayoutSubviews()
print("lifecycle", #function)
}
override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
print("lifecycle", #function)
}
// Appear
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
print("lifecycle", #function)
}
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
print("lifecycle", #function)
}
// Disappear
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
print("lifecycle", #function)
}
override func viewDidDisappear(_ animated: Bool) {
super.viewDidDisappear(animated)
print("lifecycle", #function)
}
deinit {
print("lifecycle", #function)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment