Reputation: 135
having trouble with my first app login screen... it looks good on iphone 8 screen size
but when the screen is smaller - the images go off screen.
i use auto-layout with interface builder.
tried playing around with the constraints: - spacing less or equal with high priority - use a stack view - autoshrink on the text label - compression resistance
so far couldn't get the right set of constraints for it to work.
anyone?
Update following the comments:
these are my constraints: and autoshrink on the label with "minimum font scale"
i want the the images will get closer to the text, and the text to shrink so they all will be shown in one line.
Upvotes: 0
Views: 310
Reputation: 4323
You need to anchor the images to the edges, then it will shrink the font size as long as you have set Autoshrink
. Connect as the image below.
Basically, it is connected like this
|<-->image<-->label<-->image<-->|
Then set them images to fixed sizes, and let the label size itself.
You also need to position them on the Y axis.
Upvotes: 1
Reputation: 2315
I have done with this
The following result in iPhone 5s
and 8 plus
Upvotes: 0