Skip to content
Permalink
Browse files

Export method to get current status bar height

Summary:
Addresses #2515 .
Closes #5039

Reviewed By: svcscm

Differential Revision: D2799224

Pulled By: nicklockwood

fb-gh-sync-id: 8f0a0f229a1588b1033b0121868c1f82e4dc6684
  • Loading branch information...
jedlau authored and facebook-github-bot-5 committed Jan 4, 2016
1 parent e42c6d4 commit 52220a96f9b212e91d187bef9e79cf34fc57f51e
Showing with 7 additions and 0 deletions.
  1. +7 −0 React/Modules/RCTStatusBarManager.m
@@ -89,6 +89,13 @@ - (void)applicationWillChangeStatusBarFrame:(NSNotification *)notification
[self emitEvent:@"statusBarFrameWillChange" forNotification:notification];
}

RCT_EXPORT_METHOD(getHeight:(RCTResponseSenderBlock)callback)
{
callback(@[@{
@"height": @([UIApplication sharedApplication].statusBarFrame.size.height),
}]);
}

RCT_EXPORT_METHOD(setStyle:(UIStatusBarStyle)statusBarStyle
animated:(BOOL)animated)
{

1 comment on commit 52220a9

@tomauty

This comment has been minimized.

Copy link
Contributor

commented on 52220a9 Jan 18, 2016

:)

Please sign in to comment.
You can’t perform that action at this time.