Export method to get current status bar height

Summary:
Addresses #2515 .
Closes https://github.com/facebook/react-native/pull/5039

Reviewed By: svcscm

Differential Revision: D2799224

Pulled By: nicklockwood

fb-gh-sync-id: 8f0a0f229a1588b1033b0121868c1f82e4dc6684
This commit is contained in:
Jed Lau 2016-01-04 04:30:37 -08:00 коммит произвёл facebook-github-bot-5
Родитель e42c6d4446
Коммит 52220a96f9
1 изменённых файлов: 7 добавлений и 0 удалений

Просмотреть файл

@ -89,6 +89,13 @@ RCT_EXPORT_MODULE()
[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)
{