今天发现一个崩溃,在dequeueReusableCellWithIdentifier,崩溃日志上提示必须先resgist一个cell。如下
、、、
unable to dequeue a cell with identifier AddAddressCellIdentify - must register a nib or a class for the identifier or connect a prototype cell in a storyboard
-[AddAddressVC tableView:cellForRowAtIndexPath:] (AddAddressVC.m:)
、、、
这个崩溃是有前提的
1.iOS8系统 (我的是iphone6)
2.tableview是UITableViewStylePlain类型
3.tableview的懒加载中
先设置 _listTableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
再
_listTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
然后注册cell
修改方法把cell注册放在_listTableView.separatorStyle = UITableViewCellSeparatorStyleNone;前面
网友评论