-4

it seems like I updated Xcode and suddenly my app's UI broke.

The UIViewController is embedded in a Navigation bar, and the parent viewcontroller is visible behind it. enter image description here enter image description here

degenPenguin
  • 725
  • 1
  • 8
  • 23
  • Your app isn't broken. This is how iOS 13 displays presented view controllers. There's nothing to fix. – rmaddy Oct 03 '19 at 17:47

1 Answers1

-1

You're presenting this ViewController modally. By default UIViewController.modalPresentationStyle is .automatic, and it's .pageSheet in most cases on iOS 13. You should specify modal presentation style, when presenting that ViewController. It's should look like

let vc = SomeVC()
vc.modalPresentationStyle = .overFullScreen
present(vc, animated: true)

In storyboard, you should tap on Segue and change it's Presentation

Like this

For details, you can visit that medium blog.

Iliya Kisliy
  • 241
  • 1
  • 5