Skip to content

Commit 5df8132

Browse files
committed
[iOS] Rename RCTRootViewFrameDidChangeNotification as it's not tracking root view frame changes
1 parent 353d8d3 commit 5df8132

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

packages/react-native/Libraries/AppDelegate/RCTAppDelegate.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ - (void)windowScene:(UIWindowScene *)windowScene
192192
interfaceOrientation:(UIInterfaceOrientation)previousInterfaceOrientation
193193
traitCollection:(UITraitCollection *)previousTraitCollection API_AVAILABLE(ios(13.0))
194194
{
195-
[[NSNotificationCenter defaultCenter] postNotificationName:RCTRootViewFrameDidChangeNotification object:self];
195+
[[NSNotificationCenter defaultCenter] postNotificationName:RCTWindowFrameDidChangeNotification object:self];
196196
}
197197

198198
#pragma mark - RCTCxxBridgeDelegate

packages/react-native/React/Base/RCTConstants.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ RCT_EXTERN NSString *const RCTPlatformName;
1212
RCT_EXTERN NSString *const RCTUserInterfaceStyleDidChangeNotification;
1313
RCT_EXTERN NSString *const RCTUserInterfaceStyleDidChangeNotificationTraitCollectionKey;
1414

15-
RCT_EXTERN NSString *const RCTRootViewFrameDidChangeNotification;
15+
RCT_EXTERN NSString *const RCTWindowFrameDidChangeNotification;
1616

1717
/**
1818
* This notification fires when the bridge initializes.

packages/react-native/React/Base/RCTConstants.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
NSString *const RCTUserInterfaceStyleDidChangeNotification = @"RCTUserInterfaceStyleDidChangeNotification";
1313
NSString *const RCTUserInterfaceStyleDidChangeNotificationTraitCollectionKey = @"traitCollection";
1414

15-
NSString *const RCTRootViewFrameDidChangeNotification = @"RCTRootViewFrameDidChangeNotification";
15+
NSString *const RCTWindowFrameDidChangeNotification = @"RCTWindowFrameDidChangeNotification";
1616

1717
NSString *const RCTJavaScriptDidFailToLoadNotification = @"RCTJavaScriptDidFailToLoadNotification";
1818
NSString *const RCTJavaScriptDidLoadNotification = @"RCTJavaScriptDidLoadNotification";

packages/react-native/React/CoreModules/RCTDeviceInfo.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ - (void)initialize
7373

7474
[[NSNotificationCenter defaultCenter] addObserver:self
7575
selector:@selector(interfaceFrameDidChange)
76-
name:RCTRootViewFrameDidChangeNotification
76+
name:RCTWindowFrameDidChangeNotification
7777
object:nil];
7878
}
7979

0 commit comments

Comments
 (0)