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

后端 未结 2 1479
清歌不尽
清歌不尽 2020-12-19 21:04

I have a horizontal paging UIScrollview, following is my VFL constraints for leading/trailing H:|-0-[ScrollView]-0-| (aligned to superview).

<
2条回答
  •  半阙折子戏
    2020-12-19 22:00

    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

提交回复
热议问题