How to design an UIScrollView in storyboard

2019-03-06 09:22发布

问题:

I have a UIScrollView that has an embedded UIView within it. The UIView is set to have a vertical height of 1000. Further, there is a button that is centered horizontally and set to have be 20 units from the bottom edge of UIView. Everything works as expected but I am unable to design in storyboard for such a scenario. See screenshot below. The contents outside the screensize are not visible - how does one see / scroll the view into place

Thanks in advance.

回答1:

In Storyboard:

  • Select the ViewController
  • Set its Simulated Size to freeform and height to 1000.