I'm currently working with the following : Swift (1.2), Xcode (6.3) and iOS 8.3.
I currently have an application that look similar to this sample I've made for this question :
For each UIButton / UILabel I would like to configure their font size depending on which device is used (iPhone 4s to iPhone 6 Plus for example).
As you can see I tried to use the "text-displaying control" in order to add a large font size (44) and another one smaller (33). For this second one, the setting is on "Width: Compact ; Height: Any".
Below are my current results :
However, as you can see, the font on the iPhone 6 Plus is still the little one. I tried to change the settings (of the little font) for "Width: Compact ; Height: Regular" and with the System font ; but the result is the same :(
How could I have something like this (iPhone 6 Plus with the large font size) ?
Is there a way to :
- target specific devices with AutoLayout directly within the storyboard ?
- use some tricks to make it look great (maybe with constraints and minimum font scale) ?
- do it outside the storyboard (through the code) ? The only solution is to check the value of
UIScreen.mainScreen().bounds.size.width
?