「NSInternalInconsistencyException」、理由:「識別子eventCell有するセルをデキューすることができない - 識別子のためのペン先やクラスを登録したり、ストーリーボードで試作電池を接続する必要があります」すぐにセルをデキューするにはどうすればよいですか?
相続コード
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {// this sets the title and subtitle to the Title and Location in the given EventPlan
let cell = tableView.dequeueReusableCell(withIdentifier: "eventCell ", for: indexPath) as UITableViewCell
cell.textLabel?.text = eventsArray[indexPath.row].title
cell.detailTextLabel?.text = eventsArray[indexPath.row].location
return cell
}
// here's my code for eventplan
class EventPlan : NSObject {
var title:String
var location:String
init(tits: String, locs: String){
self.title = tits
self.location = locs
}
}
let event = EventPlan(tits: "Wise BDAY", locs: "UVA-Wise")
私の主なストーリーボードでeventCellとしてセル識別子にラベルを付けると思われていますが、まだエラーが表示されます。私はそれを正しく接続していませんか?
をきれいにして再実行してください!それは助けた –
@ダンカンC:1つの単語ビンゴ:)従って投票:D –
@ KunjPatelそれが答えを受け入れるべきであるあなたの問題を解決すれば。 –