Setting space between some items in stack view

iOS 11 and above

stackView.setCustomSpacing(32.0, after: headerLabel)

For more info: Stack View Custom Spacing


It's an answer based on Lumialxk's reply. Choose the stack view you want to work on, and change the spacing property to your desired value.

Screen shot of the property panel


Inside your horizontal stack view have three more horizontal stack views so that you can have control over spacing and distribution for each item. See screenshot below:

enter image description here

Tags:

Ios

Xcode