Reputation: 65
I'm creating a scene in XCode in Main.storyboard where the user is able to choose between 5 options (buttons) and when I created the auto layout to horizontally center the buttons, as well as vertically space them 5 pixels apart:
On the 3.5 inch screen, the buttons take up most of the screen
On the 4 inch screen, the buttons take up about 3/4 of the screen
On the 4.7 inch screen, the buttons take up about half of the screen
It makes sense for this to be happening, but I created a @3x, @2x, and normal sized (1x) images using Prepo
The buttons have custom background image properties
How can I get the 4 inch, 4.5 inch, and even 5.5 inch screens on the iPhone to display like the 3.5 inch screen where the buttons take up most of the screen?
Upvotes: 0
Views: 102
Reputation: 204
Set the following constraints for your buttons.
And you already have the following constraints.
So now buttons will adjust its height to take up most of screen space. Try this.
Upvotes: 1