From 772010a9aff758985e32c1394f4afbfbb8d99610 Mon Sep 17 00:00:00 2001 From: rocman Date: Fri, 23 Oct 2015 03:14:05 -0700 Subject: [PATCH] Add controller to closest parent on time so as to fix the automaticallyAdjustContentInsets feature. Summary: Here's the bug to fix: https://github.com/facebook/react-native/issues/898 Closes https://github.com/facebook/react-native/pull/3509 Reviewed By: svcscm Differential Revision: D2574869 Pulled By: javache fb-gh-sync-id: 8d947c2a0edcfb695c2e209c7b44ae6417b6233e --- React/Views/RCTNavigator.m | 1 + React/Views/RCTTabBar.m | 1 + 2 files changed, 2 insertions(+) diff --git a/React/Views/RCTNavigator.m b/React/Views/RCTNavigator.m index 8b67222aa..2ff678eed 100644 --- a/React/Views/RCTNavigator.m +++ b/React/Views/RCTNavigator.m @@ -417,6 +417,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithCoder:(NSCoder *)aDecoder) - (void)layoutSubviews { [super layoutSubviews]; + [self reactAddControllerToClosestParent:_navigationController]; _navigationController.view.frame = self.bounds; } diff --git a/React/Views/RCTTabBar.m b/React/Views/RCTTabBar.m index 13d60f113..2c0dc28e9 100644 --- a/React/Views/RCTTabBar.m +++ b/React/Views/RCTTabBar.m @@ -80,6 +80,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithCoder:(NSCoder *)aDecoder) - (void)layoutSubviews { [super layoutSubviews]; + [self reactAddControllerToClosestParent:_tabController]; _tabController.view.frame = self.bounds; }