第一步:创建一个UILable对象
UILabel *lable = [[UILabel alloc]initWithFrame:CGRectMake(, , , )];
第二步:设置对象的各种属性
//设置文字
lable.text = @"Hello world!"; //设置字体(bold黑体)、字号
lable.font = [UIFont boldSystemFontOfSize:]; //设置字体位置:0(靠左),1(居中),2(靠右)
lable.textAlignment = ; //设置字体大小适应lable宽度
lable.adjustsFontSizeToFitWidth = YES; //设置lable的行数
lable.numberOfLines = ; //去掉背景色
lable.backgroundColor = [UIColor clearColor]; //设置能否与用户交互
lable.userInteractionEnabled = YES; //设置label中的文字能否改变
lable.enabled = NO; //设置高亮
lable.highlighted = YES;
lable.highlightedTextColor = [UIColor redColor]; //设置阴影
lable.shadowColor = [UIColor grayColor];
lable.shadowOffset = CGSizeMake(, );
第三步:将编辑好的控件加载到视图当中
[self.view addSubview:lable];
====================================================================================
====================================================================================
====================================================================================
====================================================================================
====================================================================================
====================================================================================