UITableView 重用cell方法edequeueReusableCellWithIdentifier,出现错误
UITableView 使用重用cell方法edequeueReusableCellWithIdentifier,出现错误:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'unable to dequeue a cell with identifier cell3 - must register a nib or a class for the identifier or connect a prototype cell in a storyboard'
解决:
[self.tableView registerClass:[MyTableViewCell class] forCellReuseIdentifier:customCellIdentifier];
或
[self.tableView registerNib:[UINib nibWithNibName:@"MyTableViewCell" bundle:nil] forCellReuseIdentifier:customCellIdentifier];
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。