UIViewController’s prefersStatusBarHidden not working

In iOS7, there’s actually a new property for UIViewController called modalPresentationCapturesStatusBarAppearance. Apple iOS reference. Default value is NO. When you present a view controller by calling the presentViewController:animated:completion: method, status bar appearance control is transferred from the presenting to the presented view controller only if the presented controller’s modalPresentationStyle value is UIModalPresentationFullScreen. By setting this … Read more

How to set iOS status bar background color in React Native?

iOS doesn’t have a concept of a status bar bg. Here’s how you’d achieve this in a cross-platform way: import React, { Component, } from ‘react’; import { AppRegistry, StyleSheet, View, StatusBar, Platform, SafeAreaView } from ‘react-native’; const MyStatusBar = ({backgroundColor, …props}) => ( <View style={[styles.statusBar, { backgroundColor }]}> <SafeAreaView> <StatusBar translucent backgroundColor={backgroundColor} {…props} /> … Read more