ChicagoSky ChicagoSky - 7 days ago 7
iOS Question

How to design an UIScrollView in storyboard

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.

enter image description here

Answer

In Storyboard:

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