diff --git a/Viewport.m b/Viewport.m index 12e661a..dfbd498 100644 --- a/Viewport.m +++ b/Viewport.m @@ -39,8 +39,8 @@ - (instancetype)init _lastKnownDimensions = RCTCurrentDimensions(); [[NSNotificationCenter defaultCenter] addObserver:self - selector:@selector(deviceOrientationDidChangeNotification:) - name:UIDeviceOrientationDidChangeNotification + selector:@selector(statusBarOrientationDidChangeNotification:) + name:UIApplicationDidChangeStatusBarOrientationNotification object:nil]; } @@ -54,7 +54,7 @@ - (void)dealloc #pragma mark - Notification methods -- (void)deviceOrientationDidChangeNotification:(NSNotification*)note +- (void)statusBarOrientationDidChangeNotification:(NSNotification*)note { _lastKnownDimensions = RCTCurrentDimensions(); [_bridge.eventDispatcher sendDeviceEventWithName:@"dimensionsDidChange" body:_lastKnownDimensions];