Add packager-managed assets support to NavigatorIOS

Reviewed By: @vjeux

Differential Revision: D2500520
This commit is contained in:
Alex Kotliarskyi 2015-10-02 11:59:02 -07:00 committed by facebook-github-bot-7
parent e08a507f75
commit de736227fa
1 changed files with 7 additions and 10 deletions

View File

@ -14,15 +14,16 @@
var EventEmitter = require('EventEmitter');
var Image = require('Image');
var NavigationContext = require('NavigationContext');
var React = require('React');
var RCTNavigatorManager = require('NativeModules').NavigatorManager;
var StyleSheet = require('StyleSheet');
var React = require('React');
var StaticContainer = require('StaticContainer.react');
var StyleSheet = require('StyleSheet');
var View = require('View');
var requireNativeComponent = require('requireNativeComponent');
var invariant = require('invariant');
var logError = require('logError');
var requireNativeComponent = require('requireNativeComponent');
var resolveAssetSource = require('resolveAssetSource');
var TRANSITIONER_REF = 'transitionerRef';
@ -603,12 +604,12 @@ var NavigatorIOS = React.createClass({
this.props.itemWrapperStyle,
route.wrapperStyle
]}
backButtonIcon={this._imageNameFromSource(route.backButtonIcon)}
backButtonIcon={resolveAssetSource(route.backButtonIcon)}
backButtonTitle={route.backButtonTitle}
leftButtonIcon={this._imageNameFromSource(route.leftButtonIcon)}
leftButtonIcon={resolveAssetSource(route.leftButtonIcon)}
leftButtonTitle={route.leftButtonTitle}
onNavLeftButtonTap={route.onLeftButtonPress}
rightButtonIcon={this._imageNameFromSource(route.rightButtonIcon)}
rightButtonIcon={resolveAssetSource(route.rightButtonIcon)}
rightButtonTitle={route.rightButtonTitle}
onNavRightButtonTap={route.onRightButtonPress}
navigationBarHidden={this.props.navigationBarHidden}
@ -627,10 +628,6 @@ var NavigatorIOS = React.createClass({
);
},
_imageNameFromSource: function(source: ?Object) {
return source ? source.uri : undefined;
},
renderNavigationStackItems: function() {
var shouldRecurseToNavigator =
this.state.makingNavigatorRequest ||