mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
fix: retrieve statusbar size using RCTUIStatusBarManager (#45103)
Summary: This PR changes the call from `RCTSharedApplication()` to retrieve the status bar size using the `RCTUIStatusBarManager()` method, a way which supports multi-window apps. ## Changelog: [IOS] [FIXED] - Retrieve status bar size using RCTUIStatusBarManager Pull Request resolved: https://github.com/facebook/react-native/pull/45103 Test Plan: Check if the perf menu pops up in the correct spot. Reviewed By: javache Differential Revision: D58868503 Pulled By: cipolleschi fbshipit-source-id: db5fc80a712a8a18a2863cdfbbe44f48bafe9fc3
This commit is contained in:
committed by
Facebook GitHub Bot
parent
a8a76f9bfa
commit
34cd195d9f
@@ -171,7 +171,7 @@ RCT_EXPORT_MODULE()
|
||||
- (UIView *)container
|
||||
{
|
||||
if (!_container) {
|
||||
CGSize statusBarSize = RCTSharedApplication().statusBarFrame.size;
|
||||
CGSize statusBarSize = RCTUIStatusBarManager().statusBarFrame.size;
|
||||
CGFloat statusBarHeight = statusBarSize.height;
|
||||
_container = [[UIView alloc] initWithFrame:CGRectMake(10, statusBarHeight, 180, RCTPerfMonitorBarHeight)];
|
||||
_container.layer.borderWidth = 2;
|
||||
|
||||
Reference in New Issue
Block a user