mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix RCTDevLoadingView position (#46005)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/46005 The RCTDevLoadingView is clipped in Mac Catalyst, hiding half of it under the toolbar. This change maintains the behavior on iOS of extending past the dynamic island. {F1803665273} Changelog: [Internal] Reviewed By: shwanton Differential Revision: D61209780 fbshipit-source-id: 6c9c572a9e47a8caf191c40fb53c4a7d43b64281
This commit is contained in:
committed by
Facebook GitHub Bot
parent
bd90a076f7
commit
f9abe96d19
@@ -119,8 +119,13 @@ RCT_EXPORT_MODULE()
|
||||
CGFloat windowWidth = window.bounds.size.width;
|
||||
|
||||
self->_window = [[UIWindow alloc] initWithWindowScene:window.windowScene];
|
||||
#if TARGET_OS_MACCATALYST
|
||||
self->_window.frame = CGRectMake(0, window.safeAreaInsets.top, windowWidth, 20);
|
||||
self->_label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, windowWidth, 20)];
|
||||
#else
|
||||
self->_window.frame = CGRectMake(0, 0, windowWidth, window.safeAreaInsets.top + 10);
|
||||
self->_label = [[UILabel alloc] initWithFrame:CGRectMake(0, window.safeAreaInsets.top - 10, windowWidth, 20)];
|
||||
#endif
|
||||
[self->_window addSubview:self->_label];
|
||||
|
||||
self->_window.windowLevel = UIWindowLevelStatusBar + 1;
|
||||
|
||||
Reference in New Issue
Block a user