1

I am using Autoresizing for UILabel on the xib.

And when i launch app on iPhone4/5 UILabel font looks perfect but for iPhone6/Plus font looks very small.

I referred so many link including Adjusting font size according to device screen and Category for UILabel

Also the adjustsFontSizeToFitWidth is not working for me somehow.

yourLabel.adjustsFontSizeToFitWidth=YES;
yourLabel.minimumScaleFactor=0.5;

So, i want to know if there is any other way around to have UILabel font size different for iPhone4/5 and iPhone6/Plus using Autoresizing in xib.

Community
  • 1
  • 1
iCoder86
  • 1,874
  • 6
  • 26
  • 46
  • 2
    Are you ever setting the font to a larger size? Or you set it to a large size and it resizes down for 4 / 5 devices? There isn't enough info here about what you've actually done – Wain Jun 02 '15 at 12:29
  • Thanks.. That help me.. That was the issue, I was not setting font size larger. – iCoder86 Jun 03 '15 at 08:51

1 Answers1

1

adjustsFontSizeToFitWidth only scales the font down, not up. So, if you want a bigger font you need to set one, either specifically for the iPhone 6 or always and allow iOS to scale the font down for the iPhone 4 / 5.

Wain
  • 118,658
  • 15
  • 128
  • 151
  • This doesn't work. I set up font for iPhone 6 and it looks like it doesn't scale down for iphone 4/5. – insomiac Jan 31 '16 at 02:20
  • @insomiac you'd need to create a question showing exactly what you have done, with constraint details and label config, preferably also screenshots – Wain Jan 31 '16 at 07:42