高斯模糊

2018-06-28  本文已影响13人  水灵芳蕥

/**

  * 创建需要的毛玻璃特效类型

  */

  UIBlurEffect *blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight];

 /**

  * 毛玻璃view 视图

  */

  UIVisualEffectView *effectView = [[UIVisualEffectView alloc] initWithEffect:blurEffect];

 /**

  * 添加到要有毛玻璃特效的控件中

  */

  effectView.frame = imageview.bounds;

  [imageview addSubview:effectView];

 /**

  * 设置模糊透明度

  */

  effectView.alpha = 0.8;

上一篇 下一篇

猜你喜欢

热点阅读