if let player = playerDetailsViewController.player {
players.append(player)
let indexPath = NSIndexPath(forRow: players.count-1, inSection: 0) <<error line
tableView.insertRows(at:[indexPath as IndexPath], with: .automatic)}
Asked
Active
Viewed 681 times
0

vadian
- 274,689
- 30
- 353
- 361
-
1Please add few more details. – Tejas Ardeshna Jul 20 '17 at 13:38
-
The first hit for [`[swift3] NSIndexPath forRow`](https://stackoverflow.com/search?q=%5Bswift3%5D+NSIndexPath+forRow) answers your question ... – Martin R Jul 20 '17 at 13:55
1 Answers
0
Swift 3:
let indexPath = IndexPath(row: players.count-1, section: 0)
and delete the as IndexPath
bridge cast.

vadian
- 274,689
- 30
- 353
- 361