谢谢! 解决方法 在代码中设置新属性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.
以上是内存溢出为你收集整理的iOS 11 UITableView中的额外顶部空间全部内容,希望文章能够帮你解决iOS 11 UITableView中的额外顶部空间所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)