Please sign in to comment.
Fix for dimensions not updating correctly on iPad due to screen rotation
Summary: On certain devices (in my case, any iPad Pro model), listening to `DeviceEventEmitter.didUpdateDimensions` would call back *before* the interface change takes places (i.e. calling `Dimensions.get()` in this callback would return wrong values). Turns out that we were listening for the wrong native event. Edit to add: now using `[RCTSharedApplication() statusBarOrientation]` to get the current orientation. Not yet sure why, but the `userInfo` provided by the notification was returning the wrong orientation *only* on the first time you rotate the device. This fixes the open issue: #7340 Closes #11350 Differential Revision: D4348186 Pulled By: javache fbshipit-source-id: cb2cfb9cccfc459ad4b46a5af2bec4c973132ae8
- Loading branch information...