Permalink
Browse files

Fix tvOS build issues with UIDeviceOrientation

Summary: Closes #15212

Differential Revision: D5498553

Pulled By: javache

fbshipit-source-id: 7276d836bd544d8a83b9e1711ea66044de9e9269
  • Loading branch information...
javache authored and facebook-github-bot committed Jul 26, 2017
1 parent 2fda101 commit 6d5772681feacb2d024a051f9aa3009772c933de
Showing with 4 additions and 0 deletions.
  1. +4 −0 React/Modules/RCTUIManager.m
@@ -152,10 +152,12 @@ - (void)setBridge:(RCTBridge *)bridge
selector:@selector(didReceiveNewContentSizeMultiplier)
name:RCTAccessibilityManagerDidUpdateMultiplierNotification
object:_bridge.accessibilityManager];
#if !TARGET_OS_TV
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(namedOrientationDidChange)
name:UIDeviceOrientationDidChangeNotification
object:nil];
#endif
[RCTLayoutAnimation initializeStatics];
}
@@ -177,6 +179,7 @@ - (void)didReceiveNewContentSizeMultiplier
});
}
#if !TARGET_OS_TV
// Names and coordinate system from html5 spec:
// https://developer.mozilla.org/en-US/docs/Web/API/Screen.orientation
// https://developer.mozilla.org/en-US/docs/Web/API/Screen.lockOrientation
@@ -222,6 +225,7 @@ - (void)namedOrientationDidChange
body:deviceOrientationEventBody(deviceOrientation)];
#pragma clang diagnostic pop
}
#endif
dispatch_queue_t RCTGetUIManagerQueue(void)
{

0 comments on commit 6d57726

Please sign in to comment.