In my tableView, when I press tab cell first time it calls viewDidLoad() but the other time that doesn't call viewDidLoad(). How to solve that problem. I want to call viewDidLoad() every time I press tab view in my code.
2 Answers
ViewDidLoad will be called when the view was loaded into memory. You want to use the ViewWillAppear function this will be called every time the view is about to get active.
override func viewWillAppear(animated: Bool) {
super.viewWillAppear(animated);
}
3 Comments
Umair Khalid
Thank you so much .. Helped me
viewDidLoadcalled every time? It should only be called once.