//创建毛玻璃效果

    

 

    UIBlurEffect* blurEffect=[UIBlurEffect effectWithStyle:UIBlurEffectStyleLight] ;

 

 

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

 

 

    effectView.frame=CGRectMake(0, 0, KScreenWidth, KScreenHeight) ;

 

 

    effectView.alpha=1 ;

 

 

    [self.view addSubview:effectView] ;

 

 

其效果图如下:

UIBlurEffectStyleLight:

 

 

UIBlurEffectStyleLight:

 

UIBlurEffectStyleDark: