How would I perform an action when a UITabBarItem is clicked in Swift?
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 :)
I solved it by putting the update code in the viewDidAppear() method
Put your table view's update code in its view controller's viewWillAppear(), which should get called every time the tab is tapped.
Implement this delegate
optional func tabBarController(_ tabBarController: UITabBarController, didSelect viewController: UIViewController)