Reputation: 529
I have form page with few textfields and a button. I have added constraints for each component as well.
The issue is that the button getting stretched after running the app. Please see below screenshots for my issue.
2- constraints
3- result in simulator
Upvotes: 0
Views: 38
Reputation: 1066
This is happening because the height of the device you running is larger than the device you have selected on your storyboard. To overcome this issue.
Upvotes: 3
Reputation: 100503
The height of the device you implement your constraints in is smaller than the device you test in , since you have leading , trailing , top and bottom your button will stretch depending on current device , so either remove the top/bottom constraint according to your design need
You can optionally add height to the button or leave it with it's intrinsic size
Upvotes: 0