mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-10 17:22:45 +08:00
Resolved UIExplorer StatusBarIOS deprecation warning
Summary:UIExplorer `<NavigatorIOS> - Custom` was displaying a deprecation warning. I took the warning's advice and updated with `StatusBar.setBarStyle`. Before:  After:  Closes https://github.com/facebook/react-native/pull/6042 Differential Revision: D2960522 fb-gh-sync-id: 07569372d3f3446395bbad9f87aba91d4f693440 shipit-source-id: 07569372d3f3446395bbad9f87aba91d4f693440
This commit is contained in:
committed by
facebook-github-bot-3
parent
e3f19b176a
commit
c79fed476c
@@ -16,7 +16,7 @@
|
||||
var React = require('react-native');
|
||||
var {
|
||||
NavigatorIOS,
|
||||
StatusBarIOS,
|
||||
StatusBar,
|
||||
StyleSheet,
|
||||
Text,
|
||||
View
|
||||
@@ -45,7 +45,7 @@ var NavigatorIOSColors = React.createClass({
|
||||
|
||||
render: function() {
|
||||
// Set StatusBar with light contents to get better contrast
|
||||
StatusBarIOS.setStyle('light-content');
|
||||
StatusBar.setBarStyle('light-content');
|
||||
|
||||
return (
|
||||
<NavigatorIOS
|
||||
@@ -55,7 +55,7 @@ var NavigatorIOSColors = React.createClass({
|
||||
title: '<NavigatorIOS>',
|
||||
rightButtonTitle: 'Done',
|
||||
onRightButtonPress: () => {
|
||||
StatusBarIOS.setStyle('default');
|
||||
StatusBar.setBarStyle('default');
|
||||
this.props.onExampleExit();
|
||||
},
|
||||
passProps: {
|
||||
|
||||
Reference in New Issue
Block a user