参数标签与任何可用的重载都不匹配

时间:2017-07-20 13:35:13

标签: swift swift3

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)}

1 个答案:

答案 0 :(得分:0)

斯威夫特3:

let indexPath = IndexPath(row: players.count-1, section: 0)

并删除as IndexPath桥牌。