最近遇到這樣一個問題:
section header height must not be negative - provided height for section 9 is -0.010000
原因是使用了self.tableView.estimatedSectionHeaderHeight = 0;
? ? self.tableView.estimatedSectionFooterHeight = 0;
但是如果不這是,在有些手機上比如iOS12.2會出現(xiàn)因為tableview內容過多,上拉加載在刷新reloaddata的時候出現(xiàn)自動回到tableview的contentsize中間去的問題(網(wǎng)上有的也會回到頂部去)
如果加了上面兩句又會在iOS 9.3.5手機上出現(xiàn)崩潰
解決辦法:再多加兩句
_tableView.sectionHeaderHeight = CGFLOAT_MIN;
? ? _tableView.sectionFooterHeight = CGFLOAT_MIN;
即可
參考:http://www.reibang.com/p/e61d887c3ba9