美文网首页
UILabel 修改阴影面积

UILabel 修改阴影面积

作者: 今年27 | 来源:发表于2018-06-06 10:53 被阅读5次
    - (void)setTitleSoftShadowColor:(UIColor *)color offset:(CGSize)offset {
        //阴影层的扩散半径
        self.titleLabel.layer.shadowRadius = 5.0f;
        //阴影层的透明度
        self.titleLabel.layer.shadowOpacity = 1.0;
        //阴影层的颜色,设为已存的颜色
        self.titleLabel.layer.shadowColor = color.CGColor;
        //阴影层的偏移,设为已存的偏移
        self.titleLabel.layer.shadowOffset = offset;
        self.titleLabel.layer.masksToBounds = NO;
    }
    

    相关文章

      网友评论

          本文标题:UILabel 修改阴影面积

          本文链接:https://www.haomeiwen.com/subject/mcfbsftx.html