Native implementation of <Image> intrinsic content size on iOS

Summary:
Now intrinsic content size of <Image> is implemented natively on iOS and now it is actually
`intrinsicContentSize`, not just overrided `height` and `width` styles (which was incorrect and hacky).
This change also removes support of nested content inside <Image>.
This is a first commit in the row where we improve <Image> implementation.

Reviewed By: mmmulani

Differential Revision: D5189017

fbshipit-source-id: eab3defa3d86a5d4219b4f4925ab7460b58d760f
This commit is contained in:
Valentin Shergin
2017-10-23 19:37:30 -07:00
committed by Facebook Github Bot
parent c47759a9ae
commit 7bd0855650
8 changed files with 33 additions and 4 deletions

View File

@@ -634,6 +634,18 @@ exports.examples = [
return <ImageSizeExample source={fullImage} />;
},
},
{
title: 'Intrinsic Content Size',
description: 'Images have intrinsic content size which respects ' +
'to the first `source` image size.',
render: function() {
return (
<View>
<Image source={require('./uie_thumb_big.png')} style={{alignSelf: 'center'}} />
</View>
);
},
},
{
title: 'MultipleSourcesExample',
description: