Display Zoom on iPhone Xs Max and Xr question for iOS developers on the forum

So, new code. Output in “normal” mode:

Native scale: 3.0
Bounds height: 896.0

Output in zoomed mode:

Native scale: 3.312
Bounds height: 812.0

Code used:

print("Native scale: \(UIScreen.main.nativeScale)")
print("Bounds height: \(UIScreen.main.bounds.height)")
1 Like