iPhone X - Presentation controller wrong sizing when modalPresentationStyle = Popover and keyboard is active (home indicator safe area issue)

Originator:felipekellermann
Number:rdar://39945771 Date Originated:May 3 2018
Status:Open Resolved:
Product:iOS + SDK Product Version:11.3.1 (15E302)
Classification:UI/Usability Reproducible:Always
 
Area:
UIKit

Summary:
A presentation controller using modalPresentationStyle = Popover miscalculates the sizing when keyboard is presented. It is considering the home indicator (safe area) when it should not consider it.

Steps to Reproduce:
1 - Using iPhone X (visible home indicator) present a controller using modalPresentationStyle = Popover.
2 - UIKit correctly calculates home indicator safe area offsetting the content.
3 - Present the keyboard which already offsets the home indicator: observe the double offset creating a large gap between the controller and the keyboard.

See attached screenshots:
Radar-Presentation-Safe-Area-1.PNG - iPhone 6 Plus
Radar-Presentation-Safe-Area-2.PNG - iPhone X

Expected Results:
The presentation controller should be correctly sized when using a device with safe area insets (e.g., home indicator) as it does without safe area insets. See attached screenshots.

Actual Results:
The presentation controller ends up being incorrectly resized.

Version/Build:
11.3.1 (15E302)

Configuration:

---

https://www.dropbox.com/s/qeeblm1gjcv6n0v/Radar-39945771.zip?dl=0

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!