Storyboard UIScrollView contentSize?

后端 未结 8 1745
-上瘾入骨i
-上瘾入骨i 2020-12-14 20:20

I feel like I have touched on every single possible cause for stopping this, but I have a UIScrollView in my Storyboard hooked up with an outlet and in the viewDidLoad I set

8条回答
  •  悲哀的现实
    2020-12-14 20:55

    The issue is most probably with Auto Layout. UIScrollView needs special attention when using AutoLayout.

    Quick-fix - bind one of the scroll's subviews to the top AND bottom space of it's superview (the scroll view).

    Long story: Questions on SO: UIScrollView not scrolling regardless of large contentSize, UIScrollView will not scroll, even after content size set, UIScrollView doesn't use autolayout constraints

    Apple's Documentation: https://developer.apple.com/library/ios/technotes/tn2154/_index.html

提交回复
热议问题