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
 
posted @ 2015-03-26 17:41  NSFuck  阅读(269)  评论(0编辑  收藏  举报