Size classes :
compact width any height for all compact width layout (all phones except iPhone 6 plus)
compact width regular height for all iphone in potrait
any width compact height for all iphone in landscape (except iphone 6 plus)
regular width compact height (for iPhone 6 plus) iphone 6 plus in landscape
Now i have label and i change the font size for iPhone 6 and iPhone 6 plus e.g for "compact width any height" its "12" and for "compact width regular height" its "15" in portrait . the size is 15 for all iPhones in portrait.
But it is all right in landscape when i change the font size of "any width compact height" to "12" and "regular width compact height" to "15" its working fine .
My Question is that how should i do the same for portrait ???
[self setFont:[UIFont fontWithName:@"HelveticaNeueLTStd-Lt" size:49.0]];
Set the font size now i calculate the size with respect to ratio .
As we know iPhone 5 is 85.3 % smaller than iPhone 6 so after some research...
if (IS_IPHONE_6)
[self setFont:[UIFont fontWithName:self.font.fontName size:(self.font.pointSize)*1.18]];
else if (IS_IPHONE_5)
{
[self setFont:[UIFont fontWithName:self.font.fontName size:(self.font.pointSize)]];
}
else
{
[self setFont:[UIFont fontWithName:self.font.fontName size:(self.font.pointSize)*1.3]];
}
This will solve my problem ......
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