• iOS笔记之UIKit_UILable


        UILabel*label3 = [[UILabel alloc]initWithFrame:CGRectMake(0, 60+10+60+10+60+10, 320, 60)];

        label3.backgroundColor = [UIColor redColor];

        label3.text = @"我爱你就啦飞蛾我爱你就啦飞蛾我爱你就啦飞蛾我爱你就啦飞蛾我爱你就啦飞蛾我爱你就啦飞蛾我爱你就啦飞蛾我爱你就啦飞蛾我爱你就啦飞蛾我爱你就啦飞蛾我爱你就啦飞蛾我爱你就啦飞蛾我爱你就啦飞蛾我爱你就啦飞蛾我爱你就啦飞蛾";

        label3.textColor = [UIColor grayColor];

        label3.textAlignment  = NSTextAlignmentFromCTTextAlignment(kCTTextAlignmentCenter);

        //label.font = [UIFont systemFontOfSize:20];

        label3.font = [UIFont fontWithName:@"Chalkduster" size:10];

        //设置多行显示的模式 设置成0 就是多行显示

        label3.numberOfLines  = 0;

        label3.lineBreakMode = NSLineBreakByCharWrapping;

        label3.adjustsFontSizeToFitWidth = YES;

        label3.highlighted = YES;

        label3.highlightedTextColor = [UIColor redColor];

        label3.shadowColor = [UIColor purpleColor];

        label3.shadowOffset = CGSizeMake(3, 0);

         n//设置文本信息的高亮颜色

        label4.highlightedTextColor = [UIColor lightGrayColor];

        //编号

        label4.tag = 104;

        //UIView属性 透明度

        label4.alpha = 0.5;    

       //0 ~1.0之间  0 全透  1.0不透    

        [self.view addSubview:label3];

        

        NSArray*arry = [UIFont familyNames];

        [arry enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {

            NSLog(@"%@",obj);

        }];

  • 相关阅读:
    C# 系统应用之通过注册表获取USB使用记录(一)
    web项目测试方法总结
    C#面向对象编程实例-猜拳游戏
    c#基础这些你都看过吗?(一)-----仅供初学者使用
    .NET事件监听机制的局限与扩展
    SQL代码
    泛型接口委托
    存储过程
    小操作
    DataGridView
  • 原文地址:https://www.cnblogs.com/mapanguan/p/4149337.html
Copyright © 2020-2023  润新知