UILabel 字体添加阴影

_numberLbl=[[UILabel alloc]init];

NSShadow *shadow=[[NSShadow alloc]init];
shadow.shadowBlurRadius=6.0;
shadow.shadowOffset=CGSizeMake(0, 0);
shadow.shadowColor=[UIColor blackColor];
NSAttributedString *attString=[[NSAttributedString alloc]initWithString:[NSString stringWithFormat:@"%ld",msgNumber] attributes:@{NSShadowAttributeName:shadow}];
_numberLbl.attributedText=attString;

推荐阅读更多精彩内容