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:
Oskar Kwaśniewski
2024-06-21 08:27:50 -07:00
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;