From a1dfcdad32a911d249d31e51fcb7b79c2377a857 Mon Sep 17 00:00:00 2001 From: Francis Chong Date: Wed, 15 Apr 2015 00:43:52 +0800 Subject: [PATCH] when the app is rotated, reload the root view. Fixes #813 --- React/Base/RCTRootView.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/React/Base/RCTRootView.m b/React/Base/RCTRootView.m index 02d7ef447b2e46..ab99668c9420e4 100644 --- a/React/Base/RCTRootView.m +++ b/React/Base/RCTRootView.m @@ -109,6 +109,10 @@ - (void)setUp selector:@selector(reload) name:RCTReloadViewsNotification object:_bridge]; + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(reload) + name:UIDeviceOrientationDidChangeNotification + object:nil]; if (_bridge.loaded) { [self bundleFinishedLoading]; } else {