mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: The goal of this PR is to migrate from deprecated `[UIScreen mainScreen]` and get the `displayScale` from currentTraitCollection. Both of those return the same values. ## Changelog: [IOS] [CHANGED] - retrieve screen scale from trait collection instead of UIScreen mainScreen Pull Request resolved: https://github.com/facebook/react-native/pull/41214 Test Plan: Go to Dimensions example and check that everything works as expected ### Before <img src="https://github.com/facebook/react-native/assets/52801365/53141e67-63e2-4c3b-818e-6a232aae8a5b" height="500" /> ### After <img src="https://github.com/facebook/react-native/assets/52801365/33728fce-0298-459c-b63e-a0b8ea34bde1" height="500" /> Reviewed By: NickGerleman Differential Revision: D50736794 Pulled By: javache fbshipit-source-id: d512cba1120204be95caf43ac9916f6597e2ccc8