错误原因:
未提前注册tableView的cell,执行该行代码时,会执行 tableView: cellForRowAtIndexPath:方法,最终崩溃在tableView dequeueReusableCellWithIdentifier:kMyCustomCellId forIndexPath:indexPath
解决办法:
提前注册tableView的cell,在视图加载的时候。
[self.tableView registerClass:[MyCustomCell1 class] forCellReuseIdentifier:kMyCustomCellId];
未提前注册tableView的cell,执行该行代码时,会执行 tableView: cellForRowAtIndexPath:方法,最终崩溃在tableView dequeueReusableCellWithIdentifier:kMyCustomCellId forIndexPath:indexPath
解决办法:
提前注册tableView的cell,在视图加载的时候。
[self.tableView registerClass:[MyCustomCell1 class] forCellReuseIdentifier:kMyCustomCellId];