当我在iOS 11 SDK上更新我的应用程序时,TableView开始表现奇怪,它增加了额外的顶部空间,但实际上额外的空间是Cell本身但它没有渲染,请在ios 11更新之前和之后查看附加图像.
谢谢!
谢谢!
解决方法
在代码中设置新属性contentInsetAdjustmentBehavior,它将解决问题.
if #available(iOS 11.0,*) { collectionView.contentInsetAdjustmentBehavior = .never }
在iOS 11中添加了一个名为contentInsetAdjustmentBehavior
的UIScrollView上的新属性,以确定调整内容偏移量
This property specifies how the safe area insets are used to modify the content area of the scroll view. The default value of this property is automatic.