简体   繁体   中英

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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