【发布时间】:2017-07-21 14:34:42
【问题描述】:
我正在尝试为我的状态栏着色,但在 iOS 版本上它不会改变它的颜色。 这是我的代码:
render(){
return(
<View>
<StatusBar backgroundColor="#553A91" barStyle="dark-content" />
<List containerStyle={{borderTopWidth: 0, borderBottomWidth: 0}}>
<FlatList
data={this.state.data}
renderItem={({item})=>(
<ListItem
roundAvatar
title={`${item.name.first} ${item.name.last}`}
subtitle={item.location.city}
avatar={{uri: item.picture.thumbnail}}
containerStyle={{borderBottomWidth: 0}}
/>
)}
keyExtractor={item=>item.email}
ItemSeparatorComponent={this.renderSeparator}
ListHeaderComponent={this.renderHeader}
/>
</List>
</View>
);
};
如何更改状态栏的背景颜色?
【问题讨论】:
标签: react-native