소스 검색

Fix topBarHeight with UIModalPresentationPageSheet (#5749)

Yogev Ben David 4 년 전
부모
커밋
9ef61a9a13
No account linked to committer's email address
3개의 변경된 파일5개의 추가작업 그리고 5개의 파일을 삭제
  1. 1
    1
      lib/ios/Constants.m
  2. 0
    4
      lib/ios/RNNStackController.m
  3. 4
    0
      lib/ios/UINavigationController+RNNOptions.m

+ 1
- 1
lib/ios/Constants.m 파일 보기

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

+ 0
- 4
lib/ios/RNNStackController.m 파일 보기

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

+ 4
- 0
lib/ios/UINavigationController+RNNOptions.m 파일 보기

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