设置位置
UIlabel*leLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 20, 168, 20)];
设置背景色
leLabel.backgroundColor = [UIColor clearColor];
设置字体颜色
leLabel.textColor = [UIColor whiteColor];
设置文字
leL
abel
.
text
=
@"1234"
阴影颜色
leLabel
.
shadowColor
= [
UIColor
colorWithWhite
:
0
alpha
:
0.5
];
阴影补偿
leLabel . shadowOffset = CGSizeMake ( 0 , - 1 );
leLabel . shadowOffset = CGSizeMake ( 0 , - 1 );
label字体大小
leLabel . font = [ UIFont boldSystemFontOfSize : 17 ];
leLabel . font = [ UIFont boldSystemFontOfSize : 17 ];
自动适应大小
leLabel . adjustsFontSizeToFitWidth = YES ;
[ self addSubview : leLabel ];
可能没有帮到你请见谅
leLabel . adjustsFontSizeToFitWidth = YES ;
[ self addSubview : leLabel ];
可能没有帮到你请见谅