IOS / Swift - How to adjust font size and margin size for each devices screen sizes with autolayout

968 views Asked by At

Coming from the Android world, I'm trying to create my first IOS app in swift. Actually stuck to build interfaces that are adpative to all screen sizes from Iphone 5s to Ipad 12.9". Autolayout works well except that I can't find how to easily adjust font size and margins for each screen sizes. Maybe I've missed or miss-understood something in my research but my question is : How can I have big margins/font sizes on big screens and smaller margins/font sizes on smaller screens ? Is it possible to have like a constant for a margin for each device or range of screen size in one place so I can easily change it ?

Update : I forgot to mention that I also tried variations on constraints and font size but theres just a few options between "regular" and "compact" and if you need to change a margin you have to change it on all your elements it's seems crazy..

In Android there's a dimension xml file by each screen size/resolution you want where you can have contants and assign them to each element you want. I can't figure out the logic behind IOS here

Thanks in advance

0

There are 0 answers