I'm working with Swift, IOS 8 and AutoLayout. I have a big label, size 40 on center of the screen.
I want that on iPhone 5s- the size of label becomes like 34, and on iPad a bigger font size, like 50.
How can I do this with AutoLayout?
I found a solution: Just go to your storyboard, click on your label and then click on "+" on the left of "Font" (Attributes Inspector) and add another font with a different size:
On my case, I added for iPad a size of 50. Worked perfectly!
Step 1 : Select UILabel and Click on plus icon in Attribute Inspector
Step 2 : To add font size for new device let suppose Iphone Portrait, hover on Compact Width -> Any Height.
Step 3 : Now change this new font to 25 i.e for iphone. And on the Font above it to be 70 which is now for devices other than iphone portrait.
Step 4 : Output on iphone6 vs Ipad Retina
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With