iOS13 screen height and safe area padding

I get the screen size at "override func viewDidLayoutSubviews() {}" method.

Running with simulator, with iOS13, screen height and top safe area padding of the first screen are not the same as ones of second and after screens.

* screenHeight and topPadding in the below code
* "first screen" means the first screen appears at first after launching the app


These values are the same in iPhone X or other devices.


I would like someone to advise me the reason of difference and how to measure.


1) Code and values of the first screen:

(Code) * called in "viewDidLayoutSubviews"

screenWidth = view.bounds.width

screenHeight = view.bounds.height

if #available(iOS 11.0, *) {

topPadding = view.safeAreaInsets.top

bottomPadding = view.safeAreaInsets.bottom

leftPadding = view.safeAreaInsets.left

rightPadding = view.safeAreaInsets.right

}

(Values)

screenWidth: 414.0

screenHeight: 896.0

topPadding: 44.0

bottomPadding: 34.0

leftPadding: 0.0

rightPadding: 0.0

2) Code and values of the second screen:

(Code) * called in "viewDidLayoutSubviews"

screenWidth = view.bounds.width

screenHeight = view.bounds.height

if #available(iOS 11.0, *) {

topPadding = view.safeAreaInsets.top

bottomPadding = view.safeAreaInsets.bottom

leftPadding = view.safeAreaInsets.left

rightPadding = view.safeAreaInsets.right

}

(Values)

screenWidth: 414.0

screenHeight: 842.0

topPadding: 0.0

bottomPadding: 34.0

leftPadding: 0.0

rightPadding: 0.0

I found out this is the specification of iOS13, so I withdraw this ticket.

iOS13 screen height and safe area padding
 
 
Q