Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

in React-native, How to change the styles of NavigatorIOS

in react-native,how to change the styles of NavigatorIOS,such as backgroundColor? thank you!

var speedNews = React.createClass({
  render: function() {
    return (
      <NavigatorIOS style={styles.container} 
      initialRoute={{ 
        title: 'SpeedNews',
        component: ViewList
      }}/>
    );
  }
});

var styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor : 'red', // it do nothing
    color : '#ffffff' // it do nothing
  }
});
like image 590
Mo Chen Avatar asked Apr 13 '15 08:04

Mo Chen


Video Answer


1 Answers

As far as I know, you can only change the following properties:

  • barTintColor: The color of the background of the bar.
  • titleTextColor: The color of the font.
  • tintColor: The color of the buttons.
<NavigatorIOS
  barTintColor='#000'
  titleTextColor='#fff'
  tintColor='#fff'
  initialRoute={{
    title: 'SpeedNews',
    component: ViewList
  }} />
like image 97
Crysfel Avatar answered Sep 21 '22 13:09

Crysfel