毛玻璃效果实现(UIVisualEffectView)
2016-07-25 本文已影响49人
JasonEVA
UIImageView *bgView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"XXXXX"]];
bgView.frame = self.view.frame;
UIVisualEffectView *visView = [[UIVisualEffectView alloc] initWithEffect:[UIBlurEffect effectWithStyle:UIBlurEffectStyleLight] ];
visView.frame = self.view.frame;
[self.view addSubview:bgView];
[self.view addSubview:visView];
效果:

原图:
