Browse Source

Fix topBarHeight with UIModalPresentationPageSheet (#5749)

Yogev Ben David 5 years ago
parent
commit
9ef61a9a13
No account linked to committer's email address

+ 1
- 1
lib/ios/Constants.m View File

8
 }
8
 }
9
 
9
 
10
 + (CGFloat)topBarHeight {
10
 + (CGFloat)topBarHeight {
11
-	return [UIApplication.sharedApplication.delegate.window.rootViewController getTopBarHeight];
11
+	return [RCTPresentedViewController() getTopBarHeight];
12
 }
12
 }
13
 
13
 
14
 + (CGFloat)statusBarHeight {
14
 + (CGFloat)statusBarHeight {

+ 0
- 4
lib/ios/RNNStackController.m View File

18
 	return self.topViewController;
18
 	return self.topViewController;
19
 }
19
 }
20
 
20
 
21
-- (CGFloat)getTopBarHeight {
22
-	return self.navigationBar.frame.size.height;
23
-}
24
-
25
 - (UINavigationController *)navigationController {
21
 - (UINavigationController *)navigationController {
26
 	return self;
22
 	return self;
27
 }
23
 }

+ 4
- 0
lib/ios/UINavigationController+RNNOptions.m View File

114
     lastViewControllerInStack.navigationItem.backBarButtonItem = backItem;
114
     lastViewControllerInStack.navigationItem.backBarButtonItem = backItem;
115
 }
115
 }
116
 
116
 
117
+- (CGFloat)getTopBarHeight {
118
+    return self.navigationBar.frame.size.height;
119
+}
120
+
117
 @end
121
 @end