IOS 背景模糊化
UIView *effectView = [[UIView alloc] initWithFrame:CGRectMake(10, 70, 300, 100)]; effectView.tag = 100; effectView.backgroundColor = [UIColor clearColor]; [self.view addSubview:effectView]; UIVisualEffectView *visualEffectView = [[UIVisualEffectView alloc] initWithEffect:[UIBlurEffect effectWithStyle:UIBlurEffectStyleLight]]; visualEffectView.frame = effectView.bounds; [effectView addSubview:visualEffectView];
以为是IOS8的方法,所以最好加上判断
[[[UIDevice currentDevice] systemVersion] floatValue] >=8.0