swift 4.0 解决UITableView的style为group时, 8.3系统崩溃的问题

解决UITableView的style为group时, 8.3系统崩溃的问题

tableView的懒加载
这里写图片描述

发生崩溃的地方
这里写图片描述

崩溃原因
这里写图片描述

提示cell没有注册,但是检查发现,cell是注册的,iOS11系统模拟器运行完全没问题,iOS8.3系统模拟器运行崩溃
这里写图片描述

这个崩溃是8.3系统的重大bug!!!!!
将tableView.separatorStyle = .none,放在register注册cell的方法后面就不崩溃了

这里写图片描述

iOS8.3系统,tableView的style为group是,总是崩溃

reason: ‘unable to dequeue a cell with identifier TopicTitleCellReuseIdentifier - must register a nib or a class for the identifier or connect a prototype cell in a storyboard’

检查cell都注册过了, 果然是这个问题,调整到注册cell后面就不崩溃了

猜你喜欢

转载自blog.csdn.net/kuangdacaikuang/article/details/80409565