简体   繁体   English

如何在解雇视图控制器和加载新的视图控制器之间删除一秒钟的白色屏幕

[英]How to remove split second white screen between dismissing a view controller and loading a new view controller

I'm using this to dismiss the view controller. 我正在使用它来关闭视图控制器。

[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;

But it is still displaying the white screen before it displays the view controller and I have even changed all my components to a different colour to see if it was a component but the screen stayed white. 但是在显示视图控制器之前,它仍然显示白色屏幕,我什至将所有组件更改为其他颜色,以查看它是否是组件,但屏幕保持白色。

check out this code:- 看看这段代码:

self.view.backgroundColor = [UIColor clearColor];
self.modalPresentationStyle = UIModalPresentationCurrentContext;
[self presentModalViewController:modalVC animated:YES];

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM