breaktop
breaktop

Reputation: 2029

Using StackView on different sized buttons

I am having problems using stack view with different sized buttons.

This is what I am trying to achieve with StackView enter image description here

I'm having issues with stack view because buttons '=' and '0' are different size.

This is what I've managed, but you can see the the alignment is not correct and the sizing is off. enter image description here

By looking at the images, does anyone have any suggestions on how I can achieve the desired look?

Upvotes: 3

Views: 2184

Answers (2)

miletliyusuf
miletliyusuf

Reputation: 1022

try to set Alignment attributes to Center and Distribution to Equal Spacing for your UIStackView element, and set the view mode to Center for each UIButton elements at Attributes Inspector.

Upvotes: 0

Lumialxk
Lumialxk

Reputation: 6369

Here is my solution(for = button). enter image description here

The Distributions of stack views is(from top to bottom in Outline):

Fill Proportionally

Fill

Fill Equally

Fill Equally

Upvotes: 1

Related Questions