1.UILabel加阴影效果
答案:http://www.jianshu.com/p/e8afb0e23158
因为label数据随时更新,所以换用NSMutableAttributedString:
NSShadow *shadow = [NSShadow new];
shadow.shadowColor = [MHColorUtils colorWithRGB:0x000000 alpha:0.28];
shadow.shadowBlurRadius = HLQF3scalePT(1);
shadow.shadowOffset = CGSizeMake(HLQF3scalePT(0.5), HLQF3scalePT(0.5));
UIFont *font = [UIFont fontWithName:@"PingFangSC-Medium" size:12];
NSMutableAttributedString tempString = [[NSMutableAttributedString alloc] initWithString:@"test" attributes:@{NSShadowAttributeName:shadow,NSFontAttributeName:font,NSForegroundColorAttributeName:[UIColor blackColor]}];
网友评论