mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
refactor: supportedInterfaceOrientations method to use RCTKeyWindow() (#43026)
Summary: This PR refactors `supportedInterfaceOrientations` to use RCTKeyWindow instead of `[RCTSharedApplication() keyWindow]`. ## Changelog: [IOS] [CHANGED] - Refactor supportedInterfaceOrientations method to use RCTKeyWindow() Pull Request resolved: https://github.com/facebook/react-native/pull/43026 Test Plan: CI Green Reviewed By: dmytrorykun Differential Revision: D59109614 Pulled By: cipolleschi fbshipit-source-id: 025534c419078dce29e1e5caacf8a1b15de1abcc
This commit is contained in:
committed by
Facebook GitHub Bot
parent
fb58494283
commit
815c415fb9
+1
-1
@@ -62,7 +62,7 @@
|
||||
- (UIInterfaceOrientationMask)supportedInterfaceOrientations
|
||||
{
|
||||
UIInterfaceOrientationMask appSupportedOrientationsMask =
|
||||
[RCTSharedApplication() supportedInterfaceOrientationsForWindow:[RCTSharedApplication() keyWindow]];
|
||||
[RCTSharedApplication() supportedInterfaceOrientationsForWindow:RCTKeyWindow()];
|
||||
if (!(_supportedInterfaceOrientations & appSupportedOrientationsMask)) {
|
||||
RCTLogError(
|
||||
@"Modal was presented with 0x%x orientations mask but the application only supports 0x%x."
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
- (UIInterfaceOrientationMask)supportedInterfaceOrientations
|
||||
{
|
||||
UIInterfaceOrientationMask appSupportedOrientationsMask =
|
||||
[RCTSharedApplication() supportedInterfaceOrientationsForWindow:[RCTSharedApplication() keyWindow]];
|
||||
[RCTSharedApplication() supportedInterfaceOrientationsForWindow:RCTKeyWindow()];
|
||||
if (!(_supportedInterfaceOrientations & appSupportedOrientationsMask)) {
|
||||
RCTLogError(
|
||||
@"Modal was presented with 0x%x orientations mask but the application only supports 0x%x."
|
||||
|
||||
Reference in New Issue
Block a user