- (
void
)moHuXiaoGuo{
UIImageView
*imageview = [[
UIImageView
alloc]initWithFrame:
self
.view.bounds];
imageview.image = [
UIImage
imageNamed:@
"111"
];
imageview.contentMode =
UIViewContentModeScaleAspectFit
;
imageview.userInteractionEnabled =
YES
;
[
self
.view addSubview:imageview];
UIBlurEffect
*blur = [
UIBlurEffect
effectWithStyle:
UIBlurEffectStyleLight
];
UIVisualEffectView
*effectview = [[
UIVisualEffectView
alloc] initWithEffect:blur];
effectview.frame = CGRectMake(0, 0, imageview.bounds.size.width, 600);
[imageview addSubview:effectview];
UIButton
*btn = [
UIButton
buttonWithType:
UIButtonTypeSystem
];
btn.frame = CGRectMake(10, 50, 100, 40);
[btn setTitle:@
"btn"
forState:
UIControlStateNormal
];
[effectview.contentView addSubview:btn];
}