ios UIScrollView have a bad default contentOffset - swift

前端 未结 3 1162
深忆病人
深忆病人 2021-01-11 09:22

I have a View inside a ScrollView inside my main View

The problem is that my scrollView have a bad default contentOffset. His value is (0, -64) in portrait

T

3条回答
  •  走了就别回头了
    2021-01-11 10:25

    It's probably an issue with the view insets.

    On your XIB/Storyboard for your view controller, make sure to uncheck the Adjust Scroll View Insets

    uncheck the Adjust Scroll View Insets

    or in your code add self.automaticallyAdjustsScrollViewInsets = false

提交回复
热议问题