1

In iOS 13 when i call to other StoryBoard, when charge the ViewController appear a black screen on my view.

I use this code for call a new StoryBoard:

UIStoryboard *homeSB = [UIStoryboard storyboardWithName:SBNameHome bundle:nil];
UIViewController *homeVC = [homeSB instantiateInitialViewController];
homeVC.modalPresentationStyle = UIModalPresentationFullScreen;
homeVC.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;

[self presentViewController:homeVC animated:YES completion:nil];

This project use multiple StoryBoards, and when i call a new StoryBoard fail. If i build a new ViewController with Xib, don't appear the black screen, but the project was built with multiple StoryBoard instead of Xib. I think that this is caused by the new SceneDelegate in iOS 13.

Any idea? Thanks.

  • Is your homeVC is empty? I mean it might be possible that because of dark mode and empty view controller you are facing this issue – Dixit Rathod Nov 22 '19 at 12:39
  • The application is fully developed and worked perfectly on iOS 12 and earlier, but with iOS 13 it has stopped working. – Antonio Ureba Nov 27 '19 at 07:15

3 Answers3

0

@Antonio Ureba

Try the presentation style

UIModalPresentationStyle.overFullScreen
Sreekanth P M
  • 355
  • 3
  • 13
  • The first StoryBoard appear well, but when go to the next StoryBoard, the view appear with normallity, but at two seconds appear the black screen in my view. – Antonio Ureba Nov 27 '19 at 07:17
  • @AntonioUreba Can you try by removing the code for transition style `homeVC.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;` – Sreekanth P M Nov 29 '19 at 10:56
0

Replace

homeVC.modalPresentationStyle = UIModalPresentationFullScreen;

With

homeVC.modalPresentationStyle = UIModalPresentationOverFullScreen;
Prakash Shaiva
  • 1,047
  • 8
  • 12
  • The first StoryBoard appear well, but when go to the next StoryBoard, the view appear with normallity, but at two seconds appear the black screen in my view. – Antonio Ureba Nov 27 '19 at 07:16
-1

Try to set backgroundColor, I was facing Blackscreen too, but i fixed it by change the backgroundColor

view.backgroundColor = UIColor.white

Muliawan
  • 14
  • 3
  • The first StoryBoard appear well, but when go to the next StoryBoard, the view appear with normallity, but at two seconds appear the black screen in my view. – Antonio Ureba Nov 27 '19 at 07:17
  • Try to use ViewControllerClassGoHere.modalPresentationStyle = .fullScreen – Muliawan Nov 30 '19 at 21:53