react-native/React
Nick Lockwood 799168929c Unify XCAsset handling logic
Summary: @​public

This diff unifies the logic for detecting when images refer to XCAsset files into a single function (RCTXCAssetNameForURL) and uses it for both +[RCTConvert UIImage:] and RCTImageLoader.

I've also tightened the definition of XCAssets so that it only applies to images inside .car files, not any image inside the main bundle. This avoids using the +[UIImage imageNamed:] when not strictly necessary, which is desirable since that method is not thread-safe, and has undocumented caching behavior that is difficult to reason about.

Reviewed By: @javache

Differential Revision: D2526400

fb-gh-sync-id: 7199c2a44f1d55ff236d2c38a0a9368739b993d5
2015-10-12 04:15:27 -07:00
..
Base Unify XCAsset handling logic 2015-10-12 04:15:27 -07:00
Executors Guard against multiple calls from the dev menu 2015-10-02 04:54:23 -07:00
Layout Fix width being ignored when has a value of 0 2015-09-25 15:42:21 -07:00
Modules Implemented inline image support for <Text> 2015-10-08 11:56:25 -07:00
React.xcodeproj Implemented inline image support for <Text> 2015-10-08 11:56:25 -07:00
Views Implemented inline image support for <Text> 2015-10-08 11:56:25 -07:00