On the uiview that need to be blurred. Add a Uivisualeffectview object to it.
Effects such as:
The code is as follows:
Uiimageview *imageview = [[uiimageviewalloc]init];
ImageView. frame =CGRectMake(ten, +,+) ;
ImageView. image = [UIImageimagenamed:@ "2"];
ImageView. Contentmode = Uiviewcontentmodescaleaspectfit;
ImageView. userinteractionenabled =YES;
[Self. View addsubview: ImageView];
uiblureffect *blur = [uiblureffecteffectwithstyle: Uiblureffectstylelight];
uivisualeffectview *effectview = [[uivisualeffectviewalloc] Initwitheffect: Blur];
Effectview. frame =cgrectmake(0,0, ImageView. Size. width/2,+);
[ImageViewAddsubview: Effectview];
UIButton *btn = [UIButtonbuttonwithtype:uibuttontypesystem ];
Btn. frame =CGRectMake(ten, +,+) ;
[btn settitle:@ "btn"forstate:uicontrolstatenormal];
[Effectview. Contentview addsubview: btn];
iOS Development Communication Group 361513739
Simple implementation of the IOS 8 blur view (frosted glass effect) Uivisualeffectview