I have to adjust my label text size depending of the device (iPad, iPhone) and these orders just doesn't seem to work. I have my label declared in the interface, set on property as IBOutlet and synthesized. Then:
label.font = [UIFont fontWithName:@"Arial Black" size:50.0];
label.minimumFontSize = 50.0;
The size just doesn't change. :S
Any advices?
It may be useful to you to use:
[label setFont:[UIFont systemFontOfSize:35]];
or
[label setFont: [UIFont fontWithName:@"Arial" size:50.0]];
There's nothing wrong in your code except for the font you are using. It should be :
label.font = [UIFont fontWithName:@"Arial" size:50];
Actually Arial Black is not supported by iphone. You can check the list of the fonts supported by iPhone here.
You should take a look of the fonts you can use by Default in iOS here is a link: iOS Links http://iosfonts.com/
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