我是 iOS 编程的新手,我已经实现了 UITableViewController 并在我的主页上像弹出窗口一样获得了 tableViewController 设计,背面我在主页和 tableViewController 之间添加了模糊效果。模糊效果视图和 UITableView 都作为子视图添加到主屏幕中。
这是我的问题:
当我验证 tableViewController 的 UITextfields 时,alertController 出现在模糊效果和 tableViewController 的背面,我需要在 tableViewController 上使用它。
我怎样才能得到??
我使用下面的代码来实现模糊效果和 tableView:
UIVisualEffect *blurEffect;
blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleDark];
visualEffectView = [[UIVisualEffectView alloc] initWithEffect:blurEffect];
visualEffectView.frame = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height);
[[UIApplication sharedApplication].keyWindow addSubview:visualEffectView];
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
viewaccept = (AcceptViewController *)[storyboard instantiateViewControllerWithIdentifier:@"AcceptViewController"];
[viewaccept willMoveToParentViewController:self];
CGRect screen = [[UIScreen mainScreen] bounds];
CGRect newFrame = CGRectMake(0,screen.size.height/4, self.view.frame.size.width, 350);
UIEdgeInsets insets = UIEdgeInsetsMake(0,10,0,10);
viewaccept.view.frame = UIEdgeInsetsInsetRect(newFrame,insets);
CGRect splitframe = …Run Code Online (Sandbox Code Playgroud)