I am a beginning developer in Swift, and I am creating a basic app that includes a UITableView. I want to refresh a certain row of the table using:
self.tableView.reloadRowsAtIndexPaths(paths, withRowAnimation: UITableViewRowAnimation.none)
You can create an
NSIndexPath using the row and section number then reload it like so:
var indexPath = NSIndexPath(forRow: rowNumber, inSection: 0) self.tableView.reloadRowsAtIndexPaths([indexPath], withRowAnimation: UITableViewRowAnimation.Top)
In this example, I've assumed that your table only has one section (i.e. 0) but you may change that value accordingly.