Post

Replies

Boosts

Views

Activity

Reply to iOS14 statusBarHeight is not 44.0 on some devices
On Xcode 12.4, the 12 mini emulator gives 2435, 44, 44, 1125 and 375 to the following lines of code:     int screenHeight = (int)UIScreen.mainScreen.nativeBounds.size.height;     int navBarHeight = (int)self.navigationController.navigationBar.bounds.size.height;     int statusBarHeight = (int)[UIApplication sharedApplication].statusBarFrame.size.height;     int screenWidth = (int)UIScreen.mainScreen.nativeBounds.size.width;     int navBarWidth = (int)self.navigationController.navigationBar.bounds.size.width; Connecting an iPhone 12 mini device and running the same code, the returns are 2340, 44, 50, 1080 and 375. I connected an iPhone 12 Pro and the return values were the same for the emulator as for the device. There is a bug... Thanks for the suggestion to connect a real device!
Apr ’21