reload cell data in table view with Swift
You can use self.tableView.reloadData()
in order to reload your entire table or self.tableView.reloadRowsAtIndexPaths(paths, withRowAnimation: UITableViewRowAnimation.None)
in order to reload a specific cell.
You can read more about the UITableView class here
To reload visible cells of tableview in Swift 3.0
pTableView.beginUpdates()pTableView.reloadRows(at: pMessagesTableView.indexPathsForVisibleRows!, with: .none)pTableView.endUpdates()
Try this...
Swift 2.0
dispatch_async(dispatch_get_main_queue(), { () -> Void in self.tableView.reloadData()})
Swift 3.0
DispatchQueue.main.async { self.tableview.reloadData()}