Revert D4450924: Expose StatusBar height on iOS

Differential Revision: D4450924

fbshipit-source-id: a883a7417e85f0a923d5fcc4d5efff75b99c2272
This commit is contained in:
Pieter De Baets 2017-01-25 17:55:20 -08:00 committed by Facebook Github Bot
parent a407ff94ee
commit 0fc62eebc3
3 changed files with 5 additions and 9 deletions

View File

@ -438,10 +438,11 @@ const examples = [{
render() { render() {
return ( return (
<View> <View>
<Text>Height: {StatusBar.currentHeight} pts</Text> <Text>Height (Android only): {StatusBar.currentHeight} pts</Text>
</View> </View>
); );
}, },
platform: 'android',
}]; }];
exports.examples = examples; exports.examples = examples;

View File

@ -134,7 +134,7 @@ function createStackEntry(props: any): any {
* *
* ### Constants * ### Constants
* *
* `currentHeight` The height of the status bar. * `currentHeight` (Android only) The height of the status bar.
*/ */
class StatusBar extends React.Component { class StatusBar extends React.Component {
props: { props: {
@ -169,6 +169,8 @@ class StatusBar extends React.Component {
// discussion in #6195. // discussion in #6195.
/** /**
* The current height of the status bar on the device. * The current height of the status bar on the device.
*
* @platform android
*/ */
static currentHeight = StatusBarManager.HEIGHT; static currentHeight = StatusBarManager.HEIGHT;

View File

@ -132,13 +132,6 @@ RCT_EXPORT_METHOD(setNetworkActivityIndicatorVisible:(BOOL)visible)
RCTSharedApplication().networkActivityIndicatorVisible = visible; RCTSharedApplication().networkActivityIndicatorVisible = visible;
} }
- (NSDictionary *)constantsToExport
{
return @{
@"HEIGHT": @([UIApplication sharedApplication].statusBarFrame.size.height)
};
}
#endif //TARGET_OS_TV #endif //TARGET_OS_TV
@end @end