0
私は致命的なエラーを下に行くと、セルを埋めるために次のコードがあります。私はそれがセルのキャッチnil
の配列の値のために私かもしれないことを観察する。TableView indexPath致命的なエラー:インデックスが範囲外です
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell: UITableViewCell = tableView.dequeueReusableCell(withIdentifier: "cell") as UITableViewCell!
// Set text from the data model
cell.textLabel?.text = values[indexPath.row]
cell.textLabel?.font = textField.font
return cell
}
func numberOfSections(in tableView: UITableView) -> Int {
return 1
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return values.count;
}
値の配列が範囲外である可能性があります。 – koropok
'numberOfRows'メソッドのコードを追加 – Jaydeep
バックグラウンドスレッドで' values'配列を更新していますか? –