Reputation: 301
Can somebody please help me understand why the Xcode auto layout constraints keep cutting the bottom buttons? All the buttons heights are 50 and for some reason any button on the bottom gets cut. (I have shown a screenshot of my screen)
Any help would be greatly appreciated. Thank you.
Upvotes: 1
Views: 101
Reputation: 160
There is a wrong Constraint: "Bottom space to ...."
.
In your case, the "=" button's height is NOT fixed.
You should change this constraint to "Height Equals: 50"
or equals to another button.
The last, excuse me for any mistakes since my not-so-good English.
Upvotes: 0
Reputation: 22364
As I said in comment you need to remove bottom constraint from button something like this image ... select constraint and delete it and than add height constraint
So now your constraints would be top , leading , trailing and fixed height
Upvotes: 1
Reputation: 11672
The =
button should set its height = 50
instead of set the constraint to the bottom
of super view
.
Remove Bottom space to: Bottom Layout Guide
. Then drag the =
button like this
Then choose height
and edit it to 50.
Upvotes: 1
Reputation: 27428
You should not give bottom constraint in this case. your button's constraint should be like,
leading, trailing, top and fix height
Upvotes: 1