Setting UILabel - Font through code - generates error - iPhone

前端 未结 3 1455
死守一世寂寞
死守一世寂寞 2020-12-14 11:51

See following code carefully. Because it works perfectly. Try to add in your application. it will work

- (void)viewDidLoad {
[super viewDidLoad];
// title la         


        
相关标签:
3条回答
  • 2020-12-14 12:31

    Here is a list of fonts available in the iPhone OS. It would seem Arial Black is not among them.

    0 讨论(0)
  • 2020-12-14 12:32

    Try @"Arial-BoldMT"

    Besides, you could always make yourself a list of available fonts:

    for( NSString *familyName in [UIFont familyNames] ) {
      for( NSString *fontName in [UIFont fontNamesForFamilyName:familyName] ) {
        NSLog(@"%@", fontName);
      }
    }
    
    0 讨论(0)
  • 2020-12-14 12:34

    There are plenty of font apps in the App Store to see all the fonts - one of which is iFonts, an app I developed so I could email the list of fonts to someone else on the team.

    0 讨论(0)
提交回复
热议问题