When printing the screen height of the iPhone 6+ simulator I get 2208, as expected. However when I test on an actual iPhone 6+ I get 1920. Very confused about which one is right. Here is the code I'm using:
func test() {
if UIDevice().userInterfaceIdiom == .phone {
switch UIScreen.main.nativeBounds.height {
case 1136:
print("iPhone 5 or 5S or 5C")
case 1334:
print("iPhone 6/6S/7/8")
case 2208:
print("iPhone 6+/6S+/7+/8+")
case 2436:
print("iPhone X")
default:
print("unknown")
}
}
}