iOS给view加阴影效果

/**
 * 阴影效果
 */
+ (void)shadowPathWithView:(UIView *)tempView shadowColor:(UIColor *)shadowColor shadowOffset:(CGSize)size opacity:(CGFloat)opacity radius:(CGFloat)radius {
    
    tempView.layer.shadowColor = shadowColor.CGColor;
    tempView.layer.shadowOffset = size;
    tempView.layer.shadowOpacity = opacity;
    tempView.layer.shadowRadius = radius;
    
}

你可能感兴趣的:(iOS给view加阴影效果)