草庐IT

leastNormalMagnitude

全部标签

ios - 为 UITableView 部分标题返回 CGFloat.leastNormalMagnitude 会导致崩溃

我为iOS8制作了一个应用,其中一个页面使用分组的UITableView。其中有多个部分使用CGFloat.leastNormalMagnitude(或Swift2及以下版本中的CGFloat.min)作为部分页眉和页脚高度以删除“默认”空间。一切顺利,直到该应用程序在iOS9和10中运行时崩溃并出现以下错误:Terminatingappduetouncaughtexception'NSInternalInconsistencyException',reason:'sectionheaderheightmustnotbenegative-providedheightforsection