Evenly space (distribute) objects

Hi all.


Does Xcode have a "distribute" function (that would allow to select a few objects (on a layout) and space them out evenly), like all the "drawing" apps that I know?


I see the "Align" functions, but not "Distribute".


Or would the only way to achieve this to use Auto Layout???


Thanks.

Answered by Claude31 in 325949022

StackView is notably used for this.

Accepted Answer

StackView is notably used for this.

If you expect to have elements distributed for you (aling), best to use auto layout - if you want to lay them out in a pattern (distribute), take a look at collection view where you can leverage a grid.

Yes, of course. Thanks!

Evenly space (distribute) objects
 
 
Q