- (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;
}
网友评论