UIScreen.main.bounds.width and UIScreen.main.bounds.height are both wrong. It's returning 414x736 but it should be about 360x640. Device: iPhone 8 Plus.
UIScreen.main.bounds returning incorrect size
Working in Xcode, the iPhone 8+ has a screen size (in points) of 414 x 736.
This is scaled by the system, to display at (pixels) 1080 × 1920.
Reference: https://www.paintcodeapp.com/news/ultimate-guide-to-iphone-resolutions
iPhone 6 / 6s / 7 / 8 Plus:
- Point resolution (UIScreen.main.bounds.size): 414x736
- Theoretical pixel resolution based on @3x scale (UIScreen.main.nativeBounds.size): 1242x2208
===
iPhone Plus has a physical screen 1080x1920, so:
- UIScreen.main.nativeScale is supposed to be ~"2.60869565", but the simulator still shows it as "3.0", maybe on a real device it's different.
- UIScreen.main.nativeBounds.size is also supposed to be 1080x1920, but on simulator it's not.
Check “Setting > Display&Brightness > Display zoom > Larger Text” mode is selected. It can be different if that mode is on.