当我呈现模态视图控制器时,我必须应用像iOS 7这样的模糊效果,以便背景清晰并且可以看到模糊效果。以下是我正在使用的代码,但我需要在计时器完成后显示此视图控制器。但它只是在背景中显示模糊图像而不是呈现视图控制器。
UIImageView *imgView = [[UIImageView alloc]init];
imgView.frame = [[UIScreen mainScreen]bounds];
[[[GCAppDelegate instance]window] addSubview:imgView];
UIImage *image= [self getScreenShotOfWindow];
messageViewController = (GCMessageSelectionViewController *)[self.storyboard instantiateViewControllerWithIdentifier:@"GCMessageSelectionViewController"];
[self presentViewController:messageViewController animated:YES completion:^(){
//put your code here
imgView.image = image;
}];
答案 0 :(得分:0)
messageViewController可能已被推送但被模糊图像覆盖。
尝试将imgView分配给messageViewController的视图。