I have a tableView into a viewController on tab Bar. When I click into tabBar item the tableView isn't refreshing. But I have the viewWillAppear function:
override func viewWillAppear(animated: Bool) {
dispatch_async(dispatch_get_main_queue(), { () -> Void in
self.tableView.reloadData()
})
}
I'm trying call this function with tab bar delegate, but not works:
func tabBar(tabBar: UITabBar, didSelectItem item: UITabBarItem) {
dispatch_async(dispatch_get_main_queue(), { () -> Void in
self.tableView.reloadData()
})
}
Why not reload?
Thanks!