Refresh the view table when clicking on the tabBar

I want to just update my tableView (on iPhone) when I click the corresponding button in the tabBar ...

So, I think this should be done as follows:

[self.tableView reloadData]; 

Right? And done in

 (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController 

But I don’t know how to send reloadData message to tableView from tabBar controller ... Could you help me?

+4
source share
1 answer

In your UITableViewController class, implement the viewWillAppear method and call reloadData from there.

+6
source

Source: https://habr.com/ru/post/1299539/


All Articles