Skip to content

Commit 34cd195

Browse files
okwasniewskifacebook-github-bot
authored andcommitted
fix: retrieve statusbar size using RCTUIStatusBarManager (facebook#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: facebook#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
1 parent a8a76f9 commit 34cd195

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ - (UIPanGestureRecognizer *)gestureRecognizer
171171
- (UIView *)container
172172
{
173173
if (!_container) {
174-
CGSize statusBarSize = RCTSharedApplication().statusBarFrame.size;
174+
CGSize statusBarSize = RCTUIStatusBarManager().statusBarFrame.size;
175175
CGFloat statusBarHeight = statusBarSize.height;
176176
_container = [[UIView alloc] initWithFrame:CGRectMake(10, statusBarHeight, 180, RCTPerfMonitorBarHeight)];
177177
_container.layer.borderWidth = 2;

0 commit comments

Comments
 (0)