Ver código fonte

Revert "Fix/rootview bounds iphone x (#3405)" (#3441)

This reverts commit 9d4eea835a.
Yogev Ben David 6 anos atrás
pai
commit
0769f6e4da
1 arquivos alterados com 2 adições e 11 exclusões
  1. 2
    11
      ios/RCCViewController.m

+ 2
- 11
ios/RCCViewController.m Ver arquivo

@@ -27,7 +27,6 @@ const NSInteger TRANSPARENT_NAVBAR_TAG = 78264803;
27 27
 @property (nonatomic, strong) NSDictionary *originalNavBarImages;
28 28
 @property (nonatomic, strong) UIImageView *navBarHairlineImageView;
29 29
 @property (nonatomic, weak) id <UIGestureRecognizerDelegate> originalInteractivePopGestureDelegate;
30
-@property (nonatomic, strong) RCTRootView *rootView;
31 30
 @end
32 31
 
33 32
 @implementation RCCViewController
@@ -165,9 +164,7 @@ const NSInteger TRANSPARENT_NAVBAR_TAG = 78264803;
165 164
 }
166 165
 
167 166
 - (void)commonInit:(RCTRootView*)reactView navigatorStyle:(NSDictionary*)navigatorStyle props:(NSDictionary*)props {
168
-    
169
-    self.rootView = reactView;
170
-    [self.view addSubview: reactView];
167
+    self.view = reactView;
171 168
     
172 169
     self.edgesForExtendedLayout = UIRectEdgeNone; // default
173 170
     self.automaticallyAdjustsScrollViewInsets = NO; // default
@@ -304,12 +301,6 @@ const NSInteger TRANSPARENT_NAVBAR_TAG = 78264803;
304 301
     [self setStyleOnDisappear];
305 302
 }
306 303
 
307
-- (void)viewDidLayoutSubviews
308
-{
309
-    [super viewDidLayoutSubviews];
310
-    self.rootView.frame = self.view.bounds;
311
-}
312
-
313 304
 // most styles should be set here since when we pop a view controller that changed them
314 305
 // we want to reset the style to what we expect (so we need to reset on every willAppear)
315 306
 - (void)setStyleOnAppear {
@@ -801,7 +792,7 @@ const NSInteger TRANSPARENT_NAVBAR_TAG = 78264803;
801 792
                 UIViewController *viewController = (UIViewController*)obj;
802 793
                 [self addChildViewController:viewController];
803 794
                 viewController.view.frame = self.view.bounds;
804
-                [self.rootView addSubview:viewController.view];
795
+                [self.view addSubview:viewController.view];
805 796
                 [viewController didMoveToParentViewController:self];
806 797
             } else {
807 798
                 NSLog(@"addExternalVCIfNecessary: could not create instance. Make sure that your class is a UIViewController whihc confirms to RCCExternalViewControllerProtocol");