mirror of
https://github.com/status-im/react-native.git
synced 2025-01-28 02:04:55 +00:00
36e0dd2d48
Summary: public This diff fixes a bug in RCTScreenScale() on iPhone6+. The issue was due to the fact that the iPhone6+'s virtual screen resolution of 414x736 points 3x resolution (1242x2208 pixels) does not match its actual screen resolution, which is 1080p (1080x1920 pixels). I did not realize that `[UIScreen mainScreen].nativeBounds` reports the *actual* resolution, not the virtual resolution, and was dividing by the virtual scale (3.0) instead of the actual native scale factor (2.6). This only affects iPhone6+, because for all other iOS devices, the virtual resolution matches the native resolution. Reviewed By: milend Differential Revision: D2854663 fb-gh-sync-id: bce8965a151e2f005a02a5f6b54f259d01b9ab12