由于最近项目需要实现alertView窗口高斯效果,在网上参考资料后总结了一下下。具体如下:
自定义alertView窗口后,添加高斯效果,如下:
UIBlurEffect *blur = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight];
UIVisualEffectView *effectview = [[UIVisualEffectView alloc] initWithEffect:blur];
effectview.frame = CGRectMake(0, 0, alertviewWidth, 250);
[effectview setBackgroundColor:CLEARCOLOR];
[self.alertview addSubview:effectview];
ios8后可以无损使用哈,希望能帮助到你