我正在使用它来关闭视图控制器。
[self dismissViewControllerAnimated:YES completion:nil];
self.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
self.view.alpha = 0.0;
[UIView animateWithDuration:0
animations:^{self.parentViewController.view.alpha = 1.0;}];
self.parentViewController.view.alpha = 1.0;
但在显示视图控制器之前它仍然显示白色屏幕,我甚至将所有组件更改为不同的颜色,以查看它是否是一个组件,但屏幕保持白色。
答案 0 :(得分:0)
查看此代码: -
self.view.backgroundColor = [UIColor clearColor];
self.modalPresentationStyle = UIModalPresentationCurrentContext;
[self presentModalViewController:modalVC animated:YES];