0

I have a problem after updating to Xcode 11 & Swift 5 (Screenshot below).

My ViewController always has strange top space.

Is this a bug? If so, how to fix this ?

Screenshot

rmaddy
  • 314,917
  • 42
  • 532
  • 579
alex
  • 35
  • 7

1 Answers1

2

It is not caused by Swift 5.0, but rather the framework. Starting iOS 13.0, all the modal presentation are default to that kind. One way to get that to the old default is to set your modal's presentation type to .fullScreen. If you're using Storyboard, you can get it done like so:

enter image description here

Glenn Posadas
  • 12,555
  • 6
  • 54
  • 95
  • hi , thank you , it solved by change segue to modal . but i use push for navigation between controller . so how can solve it when i use push ? , sorry my english not good :) – alex Sep 25 '19 at 04:30
  • @alex you're using push? Make sure that the controller you are pushing from is embedded in a navigation controller, otherwise it would act as a controller presenting a controller modally. This is the exact solution to your problem. – Glenn Posadas Sep 25 '19 at 05:27