zoukankan      html  css  js  c++  java
  • iOS学习-UIFont

    - (void)viewDidLoad {
        [super viewDidLoad];
        [self.view addSubview:self.label];

        for (NSString * familyName in [UIFont familyNames]) {
            NSLog(@"familyName:%@", familyName);
            for (NSString * fontName in [UIFont fontNamesForFamilyName:familyName]) {
                NSLog(@"fonrName:%@", fontName);
            }
        }
    }
     
    - (void)didReceiveMemoryWarning {
        [super didReceiveMemoryWarning];
        // Dispose of any resources that can be recreated.
    }

    - (UILabel *)label {
        if (!_label) {
            _label = [[UILabel alloc]initWithFrame:CGRectMake(20, 50, self.view.frame.size.width - 40, 30)];
            _label.text = @"挂蓝高手";
            _label.textAlignment = NSTextAlignmentCenter;
            
    //        _label.font = [UIFont systemFontOfSize:14];  //使用系统字体14
    //        _label.font = [UIFont fontWithName:@"Heiti TC" size:25];  //使用黑体25
        }
        return _label;
    }

  • 相关阅读:
    服务管理命令
    软件管理
    Qt软件打包与发布(windeployqt工具)
    03
    第一章 BP神经网络
    代理模式 与 Spring AOP
    java 回调机制
    HashTable 实现
    实现Singleton模式
    BST 汇总
  • 原文地址:https://www.cnblogs.com/MrWuYindi/p/5143667.html
Copyright © 2011-2022 走看看