@interface Countryviewcontroller
Background
@property (Strong, nonatomic) UIView *backview;
End
Set background blur
-(UIView *) backview{
if (!_backview) {
_backview = [[UIView alloc]initwithframe:self.view.bounds];
Bokeh of background
Uicolor *mycolor = [Uicolor colorwithwhite:0.5 alpha:0.5];
_backview.backgroundcolor = MyColor;
[Self.view addsubview:self. Backview];
Set in front of the current controller
[Self.view bringsubviewtofront:self. Backview];
Hide at the beginning
Self. Backview.hidden = YES;
Add a Click event
UITapGestureRecognizer *tapgesture = [[UITapGestureRecognizer alloc]initwithtarget:self Action: @selector ( Actiondo)];
[_backview Addgesturerecognizer:tapgesture];
}
return _backview;
}
Implementation method
-(void) actiondo{
NSLog (@ "1231231231231231231231231231231");
}
Set a button event
-(void) click{
Show UIView
Self. Backview.hidden = NO;
}
UIView Click events. Popup view, background blur.