我有一个呈现的视图控制器,然后将呈现另一个视图控制器。第二个视图控制器不会使其下方的视图透明或禁用任何下面的视图控件。有没有人碰到这个,你怎么能解决它?
//view controller for invalid username/password popup
IncorrectPasswordViewController *viewController = [[IncorrectPasswordViewController alloc] init];
viewController.view.layer.borderColor = [UIColor whiteColor].CGColor;
viewController.view.layer.borderWidth = 3.0f;
//push the modal on the screen
viewController.modalPresentationStyle = UIModalPresentationFormSheet;
[self presentViewController:viewController animated:YES completion: nil];
CGRect r = CGRectMake(self.view.bounds.size.width/2 - 150,
self.view.bounds.size.height/2 - 70,
300, 140);
r = [self.view convertRect:r toView:viewController.view.superview.superview];
viewController.view.superview.frame = r;