Skip to content

Commit

Permalink
Revert D4450924: Expose StatusBar height on iOS
Browse files Browse the repository at this point in the history
Differential Revision: D4450924

fbshipit-source-id: a883a7417e85f0a923d5fcc4d5efff75b99c2272
  • Loading branch information
javache authored and facebook-github-bot committed Jan 26, 2017
1 parent a407ff9 commit 0fc62ee
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
3 changes: 2 additions & 1 deletion Examples/UIExplorer/js/StatusBarExample.js
Expand Up @@ -438,10 +438,11 @@ const examples = [{
render() {
return (
<View>
<Text>Height: {StatusBar.currentHeight} pts</Text>
<Text>Height (Android only): {StatusBar.currentHeight} pts</Text>
</View>
);
},
platform: 'android',
}];

exports.examples = examples;
Expand Down
4 changes: 3 additions & 1 deletion Libraries/Components/StatusBar/StatusBar.js
Expand Up @@ -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: {
Expand Down Expand Up @@ -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;

Expand Down
7 changes: 0 additions & 7 deletions React/Modules/RCTStatusBarManager.m
Expand Up @@ -132,13 +132,6 @@ - (void)applicationWillChangeStatusBarFrame:(NSNotification *)notification
RCTSharedApplication().networkActivityIndicatorVisible = visible;
}

- (NSDictionary *)constantsToExport
{
return @{
@"HEIGHT": @([UIApplication sharedApplication].statusBarFrame.size.height)
};
}

#endif //TARGET_OS_TV

@end

0 comments on commit 0fc62ee

Please sign in to comment.