//    UILabel,标签视图,主要用于显示文字
    //UILabel继承于UIView
    
    //1.创建(开辟内存初始化)
    UILabel *userlabel = [[UILabel alloc] initWithFrame:CGRectMake(20, 20, 100, 50)];
    //2.设置属性
    userlabel.backgroundColor = [UIColor redColor];
    //设置文本
    userlabel.text = @"登陆";//也可以用set方法[userlabel setText:<#(NSString *)#>]
    //设置字体样式
    //系统字体
    //userlabel.font = [UIFont systemFontOfSize:40];
    //系统字体加粗
    userlabel.font = [UIFont boldSystemFontOfSize:40];//
    //自定义文字样式
    //userlabel.font =[UIFont fontWithName:@"" size:60];
    //设置文本颜色
    userlabel.textColor = [UIColor whiteColor];
    //设置行数,默认是1, o代表无限行
    userlabel.numberOfLines = 0;
    //设置文字对齐方式
    userlabel.textAlignment = NSTextAlignmentCenter;
    //设置文字阴影
//    userlabel.shadowColor = [UIColor grayColor];
//    //设置阴影的偏移,宽度影响左右,高度影响上下
//    userlabel.shadowOffset = CGSizeMake(10, 10);
   //文本大小适应lable宽度
    userlabel.adjustsFontSizeToFitWidth = YES;
    //字体大小, 缩放比率
    userlabel.minimumScaleFactor = 0.5;