Presenting modal in iOS 13 fullscreen

后端 未结 30 2069
囚心锁ツ
囚心锁ツ 2020-11-21 06:48

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 dis

30条回答
  •  野性不改
    2020-11-21 07:04

    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)
    

提交回复
热议问题