Procházet zdrojové kódy

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

This reverts commit 9d4eea835a.
Yogev Ben David před 6 roky
rodič
revize
0769f6e4da
1 změnil soubory, kde provedl 2 přidání a 11 odebrání
  1. 2
    11
      ios/RCCViewController.m

+ 2
- 11
ios/RCCViewController.m Zobrazit soubor

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