kayanouriko / E-HentaiViewer

一个E-Hentai的iOS端阅读器
MIT License
1.02k stars 104 forks source link

tableView 在 iOS 11 与 iOS 10中的表现不相同 #27

Closed Umiiii closed 6 years ago

Umiiii commented 6 years ago

猜测是约束问题,但是我没用过约束,所以不太好改。

wx20180218-152830 2x

所有 tableView 均有这个问题

Umiiii commented 6 years ago

self.automaticallyAdjustsScrollViewInsets=NO; 解决方法:在每个Controller中setContent加入此条~ 因为我改了项目的一些文件来编译到我自己的机器上,所以我就不commit辣

kayanouriko commented 6 years ago

你好,新年快乐.. automaticallyAdjustsScrollViewInsets属性已经在iOS11废弃掉了 所以我的应用不再以automaticallyAdjustsScrollViewInsets属性作为基类属性强行设置为NO,改为用tableview的偏移量调整适应tabbar控制器的布局

通过我的测试,貌似xcode9.2中iOS10的automaticallyAdjustsScrollViewInsets属性已经不生效所以造成错位,修改首页tabbar下面控制器tableview的内容偏移量即可

if (@available(iOS 10.0, *)) {

}
else {
    _tableView.contentInset = UIEdgeInsetsMake(UINavigationBarHeight(), 0, UITabBarHeight(), 0);
}
Umiiii commented 6 years ago

明白明白,新年快乐,辛苦你了…我很久没有写过 iOS 了,记忆还停留在 iOS 10,所以不太清楚怎么适配最新版本。