react-native/Examples
Adam Comella fe5c0d2d06 iOS: Enable views to be nested within <Text>
Summary:
Previously, only Text and Image could be nested within Text. Now, any
view can be nested within Text. One restriction of this feature is
that developers must give inline views a width and a height via
the style prop.

Previously, inline Images were supported by using iOS's built-in support
for rendering images with an NSAttributedString via NSTextAttachment.
However, NSAttributedString doesn't support rendering arbitrary views.

This change adds support for nesting views within Text by creating one
NSTextAttachment per inline view. The NSTextAttachments act as placeholders.
They are set to be the size of the corresponding view. After the text is
laid out, we query the text system to find out where it has positioned each
NSTextAttachment. We then position the views to be at those locations.

This commit also contains a change in `RCTShadowText.m`
`_setParagraphStyleOnAttributedString:heightOfTallestSubview:`. It now only sets
`lineHeight`, `textAlign`, and `writingDirection` when they've actua
Closes https://github.com/facebook/react-native/pull/7304

Differential Revision: D3269333

Pulled By: nicklockwood

fbshipit-source-id: 2b59f1c5445a4012f9c29df9f10f5010060ea517
2016-05-17 10:43:30 -07:00
..
2048 Add flag "-lc++" for all checked-in projects 2016-04-22 16:23:18 -07:00
Movies Update Jest APIs on fbsource 2016-04-27 19:16:32 -07:00
TicTacToe Add flag "-lc++" for all checked-in projects 2016-04-22 16:23:18 -07:00
UIExplorer iOS: Enable views to be nested within <Text> 2016-05-17 10:43:30 -07:00
.eslintrc Add global flow types to eslint globals 2016-01-27 15:55:34 -08:00