看到这个,别想太多,别想太多,别想太多!!!
一定是代理方法, 提供的高度出现负数了,
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { }
解决方法:
暴力破解:max(cell的高度, 0), 例如max(cellHeight, 0)
该方法会自动跟0比较,取最大值
看到这个,别想太多,别想太多,别想太多!!!
一定是代理方法, 提供的高度出现负数了,
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { }
解决方法:
暴力破解:max(cell的高度, 0), 例如max(cellHeight, 0)
该方法会自动跟0比较,取最大值
本文标题:Thread 1: "Invalid row height (-
本文链接:https://www.haomeiwen.com/subject/chwhqrtx.html
网友评论