ios之Label的创建
UILabel
*label = [[UILabel
alloc]initWithFrame:CGRectMake(10,
100,
300,
150)];
label.text
= @"Hello
world!";
//背景颜色为红色
label.backgroundColor
= [UIColor
redColor];
//设置字体颜色为白色
label.textColor
= [UIColor
whiteColor];
//文字居中显示
label.textAlignment
= UITextAlignmentCenter;
//自动折行设置
label.lineBreakMode
= UILineBreakModeWordWrap;
label.numberOfLines
= 0;
//设置字体
label.font
=
[UIFont
fontWithName:@"Arial-BoldItalicMT"
size:32];
//设置阴影的颜色
label.shadowColor
= [UIColor blackColor]
补充:移动开发 , IOS ,