There are four circle UIButtons in UIView. Their layout should look like this:
|- button 1 - button 2 - button 3 - button 4 -|
I tried some ways with AutoLayout but failed. Can someone give me some advice or demo about how to build this layout?
There are four circle UIButtons in UIView. Their layout should look like this:
|- button 1 - button 2 - button 3 - button 4 -|
I tried some ways with AutoLayout but failed. Can someone give me some advice or demo about how to build this layout?
Firstly, set up the leading and the trailing constraints of the 1st and 4th button. Then, create horizontal spacing constraints in the middle between the other buttons.
Right-click on a button and choose width and height in order to set fixed width and height.
Set equal widths and equal heights by right-clicking and dragging from a button to the other ones.
Please take a look at this GIF image:
