mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
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:
committed by
Facebook Github Bot
parent
c47759a9ae
commit
7bd0855650
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user