-1

I'm using adjustsFontSizeToFitWidth to shrink the label's size. But things were fine until I tested it in a device with ios 5. :P

self.mainTitleLabel.numberOfLines=2; 
self.mainTitleLabel.adjustsFontSizeToFitWidth = YES;
self.mainTitleLabel.minimumFontSize = 4;

This is working fine in ios 6 and not in ios 5.

Also in ios 5, its shrinking when I give like this,

self.mainTitleLabel.numberOfLines=1;

Why the label is not shrinking if its having 2 lines ? What might be the possible solution for this ?

Note: The text wont go beyond 2 lines as per the static data.

Regexident
  • 29,441
  • 10
  • 93
  • 100
Pradeep Rajkumar
  • 919
  • 2
  • 12
  • 27

2 Answers2

3

This property is effective only when the numberOfLines property is set to 1.

Inoka
  • 664
  • 7
  • 16
3

I would also like to add minimumFontSize was deprecated in iOS 6 in favor of minimumScaleFactor

Ben Coffman
  • 1,750
  • 1
  • 18
  • 26