Ashish Agarwal
Ashish Agarwal

Reputation: 14925

TabBarController - reload SecondViewController

I am making a TabBarController application using the template provided by Xcode and I need to reload the second view controller everytime it is clicked. How do I do this ?

Thanks

Upvotes: 1

Views: 448

Answers (1)

Omar Abdelhafith
Omar Abdelhafith

Reputation: 21221

Whenever the tab bar switches the view controllers, the viewcontroller viewWillAppear function will be called

So add the code in the viewWillAppear function of the UIViewController

Upvotes: 1

Related Questions