How to get iOS status bar height in React-Native app?

For Android, I know that I can use StatusBar.currentHeight , but I'm not sure how to do it for iOS.

The answer to the question of how to get the size in Swift (native) has already been answered, but I need this in the response native application.

+13
source share
2 answers

You can use React Navigation , which already has iPhone X support.

Even if you do not want to use this library for any reason - you can still read the source code to copy the implementation into your code

+2
source

You can use this package, it has very good documentation. react-native-status-bar-height

0
source

Source: https://habr.com/ru/post/1268774/


All Articles