- (void)addShadowToView:(UIView *)view
withOpacity:(float)shadowOpacity
shadowRadius:(CGFloat)shadowRadius
andCornerRadius:(CGFloat)cornerRadius
andOffset:(CGSize)offsize
{
view.layer.cornerRadius= shadowRadius;
view.layer.shadowColor = [UIColor blackColor].CGColor;
view.layer.shadowOffset= offsize;
view.layer.shadowOpacity= shadowOpacity;
view.layer.shadowRadius= cornerRadius;
}
网友评论