UIScrollView Not Scrolling?

前端 未结 6 869
无人共我
无人共我 2020-12-16 18:04

I have a UIScrollView created in interface builder with a bunch of UITextView and UIImageView objects already added. I have it connect

6条回答
  •  爱一瞬间的悲伤
    2020-12-16 18:38

    The best way I know how to overcome this problem without resorting to writing code is that it all can be done within a storyboard and here is how:

    1. Leave autolayout enabled.
    2. Make a generic UIView a subview of the UIScrollView. 2.1)Put all your View components inside this generic UIView.
    3. Make a autolayout constraint between a subview and the UIScrollView. You must pin the right and/or bottom of the last subview to the right and/or bottom of the UIScrollView. This is how the UIScrollView knows the content size.

提交回复
热议问题