我使用Interface Builder将自定义行高设置为88.0,但是当app运行其高度大于10.0时。 我试着用
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
但有时会产生错误
CALayerInvalidGeometry', reason: 'CALayer bounds contains NaN:...
答案 0 :(得分:0)
CALayerInvalidGeometry
,原因:'CALayer bounds contains NaN:...
当方法heightForRowAtIndexPath
将返回nil值时会出现此错误。
请检查条件并检查您传入的阵列。
由于
答案 1 :(得分:0)
问题在于我的单元格中的UIImageView,当它不存在时我忘记了nil。
此外,行高度值在.m文件和故事板中应该相等。