uitableview64像素

xiaoxiao2021-02-28  53

项目开发久了,有的时候会出现一些莫名其妙的错误,这个错误分析可以任务,单元格的高度大于零或者是设置自适应高度,具体错误信息如下:

Value must be greater than zero or UITableViewAutomaticDimension.

一般来说没有人会把单元格的高度设置的小于零,应该是在计算的过程中出现问题:

func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { return 50-100 } func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return 10 }

转载请注明原文地址: https://www.6miu.com/read-76518.html

最新回复(0)