iOS 给label字体添加阴影

NSShadow *shadowMsg = [NSShadow new];
    shadowMsg.shadowBlurRadius=10.0;
    shadowMsg.shadowOffset=CGSizeMake(0, 0);
    shadowMsg.shadowColor=WGColorHex(0xFF1F00);
    NSAttributedString *attrStringNsg = [[NSAttributedString alloc]initWithString:mesLabel.text attributes:@{NSShadowAttributeName:shadowMsg}];
    mesLabel.attributedText=attrStringNsg;

你可能感兴趣的:(iOS 给label字体添加阴影)