UITableView
。它有多个部分,其中使用CGFloat.leastNormalMagnitude
(或Swift 2及以下版本中的CGFloat.min
)来移除节标题和页脚高度的“默认”间距。一切顺利,直到在iOS 9和10上运行应用时出现崩溃并显示以下错误:
不知何故,任何小于Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'section header height must not be negative - provided height for section 0 is -0.00000'
1
的值(除了四舍五入的0
)都被视为负数-将1
作为返回值将使标题/页脚空间再次出现。有没有解决这个问题的方法?
提前致谢。
0
吗?这对我有效。 - redent840
将使页眉/页脚上的空间... - edopelawi