How can I completely reload the view so that viewDidLoad starts up again?

I would like to reload my view so that I can viewDidLoadrepeat all my work. How to do it in Swift?

+4
source share
2 answers

viewViewDidLoadand viewWillAppearare part of the life cycle of the view controller and are automatically called by iOS after your instance has UIViewControllerreceived an instance and appears on the screen before the view. You can call them anywhere in your class controller class, but this is not a good practice, and I would never recommend that you do this!

, , viewDidLoad , .

Apple .

+3

ViewDidLoad , . ViewDidLoad (, loadData). , .

, . ViewWillAppear ViewDidAppear - .

0

All Articles