0
以下のコードは1から17までのセルのみを表示しています。indexPath.rowは0から16になります。
internal func tableView(_ tableView: UITableView,numberOfRowsInSection section: Int) -> Int {
return 20
}
internal func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = UITableViewCell(style: UITableViewCellStyle.default, reuseIdentifier:"Cell")
cell.textLabel?.text=String(indexPath.row+1)
print(indexPath.row)
return cell
}`
Scary。破棄したデータを削除して、もう一度やり直してください。 – shallowThought