Swift: Reload a View Controller

后端 未结 8 818
南旧
南旧 2020-12-15 02:41

I need to refresh a view controller when a certain button is tapped. Simply activating viewDidLoad() does not seem to be working for what I need to

相关标签:
8条回答
  • 2020-12-15 03:47

    Whatever code you are writing in viewDidLoad, Add that in viewWillappear(). This will solve your problem.

    0 讨论(0)
  • 2020-12-15 03:47

    If you are using a navigation controller you can segue again to the current UIViewController and it will be refreshed.

    0 讨论(0)
提交回复
热议问题