Page views not correctly sized after segue

限于喜欢 提交于 2019-12-02 11:13:16

This has to do with the new default modal presentation style in iOS 13.
To set the prior behavior, you need to change the presentation style to full screen.

You can do this both in storyboard by editing your segue's Presentation attribute and setting it from Automatic to Full Screen:

Alternatively, if you are presenting your View Controller programmatically, you can set your View Controllers modalPresentationStyle before presenting it, like so:

let detailController = /* your View Controller */
detailController.modalPresentationStyle = .overFullScreen
present(detailController, animated: true, completion: nil)

So the solution turned out to be more obvious than I realized. If you click on the segue symbol on the storyboard some options are displayed in the side bar.

Selecting presentation -> full screen from the drop down fixed my issue.

Adding a screenshot for clarity: https://imgur.com/BRCbx5k

Hope this helps anyone else having segue problems :)

You can programmatically present the controller like in below code :

let vc = secondStoryBoard.instantiateViewController(withIdentifier: "SearchNavVC") vc.modalPresentationStyle = .fullScreen vc.modalTransitionStyle = .crossDissolve self.present(vc, animated: true, completion: nil)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!