Adding a UIScrollView to an Existing UIView in a Storyboard

I am creating an application using a storyboard, and I want to embed one of them in a UIScrollView. So for this, I drag the UIScrollView directly into the storyboard. Then I adapt its size and position.

After that, I select all my items and drag them into the UIScrollView. My problem is that all the positions of my positions are mixed up: they are all aligned in the center of the UIScrollView, so I have to move them myself.

Is there a way to keep the same layout?

Thank you very much for your help!

Greetings

+4
source share
1 answer

One way is to select a view, and then go to the editor → embed in → scroll.

For more complex things, temporarily disable autorun, create a new empty view manager, copy / paste all your subelements there, make your voodoo with scrollview, paste them back when it's done.

+6
source

Source: https://habr.com/ru/post/1501469/


All Articles