iOS ScrollView needs constraint for y position or height

前端 未结 8 1606
栀梦
栀梦 2020-11-30 18:21
-ViewController
--View
---ScrollView (Top,Bottom,Leading,Trailing spaces to superview set to 0)
----ContentView (Top,Bottom,Leading,Trailing spaces to superview set          


        
相关标签:
8条回答
  • 2020-11-30 19:19
    1. Select your view controller
    2. Uncheck 'Adjust Scroll View Insets'

    0 讨论(0)
  • 2020-11-30 19:21

    Make sure the bottommost element inside of your content view inside of your scroll view has bottom space constraint set to 0 and make sure all elements inside content view have height set.

    This makes content view resize according to elements inside it and you don't have fixed height of your scroll view/content view and your scroll view will resize with phone's screen size.

    0 讨论(0)
提交回复
热议问题