Xcode 16 RC iPhone16 ProMax simulator status bar height is wrong

I am using Xcode 16 RC to debug an iPhone 16 app. The status bar height returned by iPhone 16 and iPhone 16 Pro is 54, while the height of the status bar returned by iPhone 16 ProMax is 44. Why is this? Here is the code I use:

[UIApplication sharedApplication].windows.firstObject.windowScene.statusBarManager.statusBarFrame.size.height

Answered by Frameworks Engineer in 803431022

This is likely just a bug, we'd appreciate a feedback report on the issue.

At the same time however, we've generally discouraged looking directly at the status bar height for most purposes in favor of UIView.safeAreaInsets or UIView.safeAreaLayoutGuide

Accepted Answer

This is likely just a bug, we'd appreciate a feedback report on the issue.

At the same time however, we've generally discouraged looking directly at the status bar height for most purposes in favor of UIView.safeAreaInsets or UIView.safeAreaLayoutGuide

Xcode 16 RC iPhone16 ProMax simulator status bar height is wrong
 
 
Q