/**
添加图片模糊效果
@parms 要添加模糊效果的view
@return
*/
+ (UIVisualEffectView *)addVisualEffectViewWithView:(UIView *)view{
UIVisualEffect *blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight];
UIVisualEffectView *visualEffectView = [[UIVisualEffectView alloc] initWithEffect:blurEffect];
visualEffectView.frame = CGRectMake(0, 0, view.frame.size.width,view.frame.size.height);
[view addSubview:visualEffectView];
return visualEffectView;
}
/**
给图片设置阴影效果
@parms 加阴影的view
@return
*/
+ (void)shadowWithView:(UIView *)view{
view.layer.shadowColor = [[UIColor grayColor] CGColor];//阴影的颜色
view.layer.shadowOpacity = 0.5f; // 阴影透明度
view.layer.shadowOffset = CGSizeMake(-1.0,1.0f); // 阴影的范围
view.layer.shadowRadius = 0.3; // 阴影扩散的范围控制
}