0
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)}
vadian
  • 274,689
  • 30
  • 353
  • 361

1 Answers1

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