How do I retrieve iOS Status Bar height in React-Native app?

jasan picture jasan · Jun 12, 2017 · Viewed 16.2k times · Source

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

The answer to how to retrieve the size in Swift(native) has already been answered but I need this in a react native app.

Answer

Oleksandr Cherniavenko picture Oleksandr Cherniavenko · Feb 21, 2018

You can use React Navigation that already have support of iPhone X.

Even if you don't want use this library because of some reason - you still can read source code to copy implementation in your code