From 0fc62eebc37f03a9bfaa1fba1e1c8bed7a63c4b7 Mon Sep 17 00:00:00 2001 From: Pieter De Baets Date: Wed, 25 Jan 2017 17:55:20 -0800 Subject: [PATCH] Revert D4450924: Expose StatusBar height on iOS Differential Revision: D4450924 fbshipit-source-id: a883a7417e85f0a923d5fcc4d5efff75b99c2272 --- Examples/UIExplorer/js/StatusBarExample.js | 3 ++- Libraries/Components/StatusBar/StatusBar.js | 4 +++- React/Modules/RCTStatusBarManager.m | 7 ------- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/Examples/UIExplorer/js/StatusBarExample.js b/Examples/UIExplorer/js/StatusBarExample.js index 4c95731a5..8c60b22ba 100644 --- a/Examples/UIExplorer/js/StatusBarExample.js +++ b/Examples/UIExplorer/js/StatusBarExample.js @@ -438,10 +438,11 @@ const examples = [{ render() { return ( - Height: {StatusBar.currentHeight} pts + Height (Android only): {StatusBar.currentHeight} pts ); }, + platform: 'android', }]; exports.examples = examples; diff --git a/Libraries/Components/StatusBar/StatusBar.js b/Libraries/Components/StatusBar/StatusBar.js index 68a67d18d..f1712b4a5 100644 --- a/Libraries/Components/StatusBar/StatusBar.js +++ b/Libraries/Components/StatusBar/StatusBar.js @@ -134,7 +134,7 @@ function createStackEntry(props: any): any { * * ### Constants * - * `currentHeight` The height of the status bar. + * `currentHeight` (Android only) The height of the status bar. */ class StatusBar extends React.Component { props: { @@ -169,6 +169,8 @@ class StatusBar extends React.Component { // discussion in #6195. /** * The current height of the status bar on the device. + * + * @platform android */ static currentHeight = StatusBarManager.HEIGHT; diff --git a/React/Modules/RCTStatusBarManager.m b/React/Modules/RCTStatusBarManager.m index 2e28f3f99..849d09436 100644 --- a/React/Modules/RCTStatusBarManager.m +++ b/React/Modules/RCTStatusBarManager.m @@ -132,13 +132,6 @@ RCT_EXPORT_METHOD(setNetworkActivityIndicatorVisible:(BOOL)visible) RCTSharedApplication().networkActivityIndicatorVisible = visible; } -- (NSDictionary *)constantsToExport -{ - return @{ - @"HEIGHT": @([UIApplication sharedApplication].statusBarFrame.size.height) - }; -} - #endif //TARGET_OS_TV @end