Last active
December 21, 2018 05:05
-
-
Save arkilis/fbee2ca6c6e26f77394c6d5434ac2da2 to your computer and use it in GitHub Desktop.
Are you familar with viewWillAppear, viewDidAppear, viewDidLoad, viewWillDisappear and viewDidDisappear (swift)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Swift 4 | |
// | |
import UIKit | |
class ViewController: UIViewController { | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
print("viewDidLoad is running") | |
} | |
override func viewWillAppear(_ animated: Bool) { | |
super.viewWillAppear(animated) | |
print("viewWillAppear is running") | |
} | |
override func viewDidAppear(_ animated: Bool) { | |
super.viewDidAppear(animated) | |
print("viewDidAppear is running") | |
} | |
override func viewWillDisappear(_ animated: Bool) { | |
super.viewWillDisappear(animated) | |
print("viewWillDisappear is running") | |
} | |
override func viewDidDisappear(_ animated: Bool) { | |
super.viewDidDisappear(animated) | |
print("viewDidDisappear is running") | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment