美文网首页
iOS 11.0 iPhone X safeArea适配

iOS 11.0 iPhone X safeArea适配

作者: 一只好猿 | 来源:发表于2017-11-15 16:38 被阅读0次

http://www.cocoachina.com/ios/20171107/21071.html

http://www.cocoachina.com/ios/20171011/20737.html

iOS 11中如果不实现-tableView: viewForFooterInSection: 和 -tableView: viewForHeaderInSection:,那么-tableView: heightForHeaderInSection:和- tableView: heightForFooterInSection:不会被调用。

这是因为estimatedRowHeight estimatedSectionHeaderHeight estimatedSectionFooterHeight三个高度估算属性由默认的0变成了UITableViewAutomaticDimension,导致高度计算不对,解决方法是实现对应方法或吧这三个属性设为0。

相关文章

网友评论

      本文标题:iOS 11.0 iPhone X safeArea适配

      本文链接:https://www.haomeiwen.com/subject/pmkhvxtx.html