iOS 简单实现毛玻璃效果

来源:互联网 发布:linux下刻录数据光盘 编辑:程序博客网 时间:2024/06/06 00:27
class LANVisualEffectView{
   
   
   
func EffectView(targetView:UIView){
       
       
let blur=UIBlurEffect(style:UIBlurEffectStyle.Light)
       
let effectview=UIVisualEffectView(effect: blur)
        effectview.
frame=CGRectMake(0,0, targetView.frame.width, targetView.frame.height)
        targetView.
addSubview(effectview)
       
       
    }
}
0 0