How to get rid of safeAreaInsets on UIScrollview (iOS 11, iPhoneX)

ε祈祈猫儿з 提交于 2019-12-06 14:59:04

I am using following to skip content inset adjustment:

UIScrollview.contentInsetAdjustmentBehavior = .never

I found that in iOS 11 UIScrollViewContentInsetAdjustmentBehavior.always includes safe area layout guide and apply these margins as insets, so tried .never it worked ))

If you set UIScrollview.contentInsetAdjustmentBehavior = .never, you'll be responsible for applying the insets. If you let to the default value, any time the view needs to be redrawn, the framework will override your settings

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!