mirror of
https://github.com/status-im/react-native.git
synced 2025-02-05 14:13:26 +00:00
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:
parent
e42c6d4446
commit
52220a96f9
@ -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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user