How to add UIScrollView to Interface builder?

后端 未结 10 2293
夕颜
夕颜 2020-12-12 17:50

I have all my controls laid out in interface builder (many labels, buttons etc). How do I put them all in a scroll view in interface builder so that I can have more space an

10条回答
  •  [愿得一人]
    2020-12-12 17:57

    I've been looking for this for a few days, and I finally came across this site with a solution that worked for me.

    Scrolling with UIScrollView

    Basically you have your main view with a UIScrollView object in it. Then another content view with all your content in it. Then you add the content view to the scroll view. And then finally set the size of the scrollview's content size to the size of the content view.

提交回复
热议问题