Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Present Full-Screen UIViewController @iOS13 [duplicate]

In iOS 13 there is a new behaviour for modal view controller when being presented.

Now it's not fullscreen by default and when I try to slide down, the app just dismiss the View Controller automatically.

How can I prevent this behaviour and get back to the old fullscreen modal vc?

modal behaviour

Thanks

like image 426
pascalbros Avatar asked Nov 17 '22 07:11

pascalbros


1 Answers

With iOS 13, as stated in the Platforms State of the Union during the WWDC 2019, Apple introduced a new default card presentation. In order to force the fullscreen you have to specify it explicitly with:

let vc = UIViewController()
vc.modalPresentationStyle = .fullScreen //or .overFullScreen for transparency
self.present(vc, animated: true, completion: nil)
like image 84
pascalbros Avatar answered Dec 10 '22 00:12

pascalbros