Last updated 1 year ago by Geoff Hackworthios
At the time of writing, WWDC 2019 is drawing to a close. Like many iOS developers I’m slowly processing all the new information that Apple threw at us and will be trying to watch as many videos as I can in the coming weeks (and months!)
I have three immediate goals for my own apps:
I’ve not yet installed iOS 13 on a real device but I can do some testing for #1 by installing Xcode-10-built apps into the iOS 13 simulator. My post iPad Navigation Bar and Toolbar Height Changes in iOS 12 explains the process in the Wait, What Did You Say? section. (That post was written a year ago so talks about Xcode 9 builds on iOS 12, but the process is the same.)
I’m still working on #2 but based on my initial testing and reading tweets from other developers making similar discoveries, I’ve found a number of behavioural changes to my apps when building with Xcode 11. I have a lot of videos to watch and information to assimilate, but in this post I want to focus on immediately noticeable, and potentially breaking, changes to view controller presentations in iOS 13.
The default presentation is now page sheet, not full screen. The header documentation for
Defaults to UIModalPresentationAutomatic on iOS starting in iOS 13.0, and UIModalPresentationFullScreen on previous versions.
By default UIViewController resolves UIModalPresentationAutomatic to UIModalPresentationPageSheet, but other system-provided view controllers may resolve UIModalPresentationAutomatic to other concrete presentation styles.
The consequences of this change differ on iPhone and iPad.
A form sheet, page sheet or popover presentation on iPhone is adapted to full screen unless a
UIAdaptivePresentationControllerDelegatemethod is used to prevent the adaption. As an example, a Settings screen might be presented as a form sheet so that it appears full screen on iPhone and in the smaller form sheet size on iPad. Technically, the appearance/adaption depends on the horizontal size class. Form/page/popover presentations on Landscape iPhone Plus and XS Max devices don’t fill the screen because they are regular width. iPad appearance depends on slide over and split-screen multitasking size. It can change whilst a view controller is presented if the horizontal size class changes because the user adjusts or removes the split.
The following screenshots show a form sheet presentation on iPhone XS for three cases: Xcode 10 build run on iOS 12, Xcode 10 build run on iOS 13, and Xcode 11 build run on iOS 13.