iOS UILabel文字投影

1
2
3
4
5
6
NSShadow *shadow = [[NSShadow alloc]init];
shadow.shadowBlurRadius = 3.0f;
shadow.shadowOffset = CGSizeMake(0, 1);
shadow.shadowColor = kCOLOR_RGBA(119,70,10,1);
NSAttributedString *attrString = [[NSAttributedString alloc]initWithString:string attributes:@{NSShadowAttributeName:shadow}];
label.attributedText = attrString;
本文总阅读量