I would like to update my UITableView when a Tab Bar Item is clicked. (I am open to any other better suggestions of how to do this besides when the Tab Bar Item is clicked). Thanks for any help :)
Asked
Active
Viewed 287 times
1
-
I tried to drag it over to the viewController but it only allows for an IBOutlet and Outlet Collection – Adam Strike Jun 28 '16 at 15:42
3 Answers
0
Put your table view's update code in its view controller's viewWillAppear()
, which should get called every time the tab is tapped.

NRitH
- 13,441
- 4
- 41
- 44
0
Implement this delegate
optional func tabBarController(_ tabBarController: UITabBarController,
didSelect viewController: UIViewController)

Proton
- 1,335
- 1
- 10
- 16
-
I tried using this method but it didn't work. I think it was because I didn't connect it to the actual button properly, how would I do that? – Adam Strike Jun 28 '16 at 16:56