Xcode 9 UIViewcontroller Form sheet full screen

After compiling a previous project with the new Xcode 9, my ViewControllers in my storyboards no longer display as a Form sheet in Portrait. On the device in landscape they display fine, but in portrait it becomes full screen. All my settings in the storyboard have Form Sheet selected, and even in code I'm presenting the view controller .modalPresentationStyle to UIModalPresentationFormSheet

Replies

I have the same problem. Portrait -> FullScreen; Landscape is fine.

Any responds or solutions.

I also have the same problem in my app 😟

It looks like something in Xcode isn't converting the form's sizes correctly.


As a workaround, you can explicitly set the content size by:

1. Select the view controller.

2. Select its Attributes Inspector

3. Tick the "Use Preferred Explicit Size" box

4. Enter the correct size for the pop-up. I use 540 x 620 for iPad.

Did you solve the problem?

Same problem occurred to me after I build the app in XCode 9.

In portarit mode, the view controller is displayed as full screen instead of a modal.

In landscape mode, everything works fine.


I tried re-establish and reconnect the relationships in storyboard but in vain.

Adding modalPresentationStyle in code did not help as well.


In interface builder, my Storyboard Segue is set as

Kind: Modal

Presentation: Form Sheet

Transition: Cover Vertical

Animations: Checked


Seems internally Xcode does not render it correctly?

Or recently there are changes to XCode's layout rendering that I am not aware of?