react-native/docs
Adam Comella 486dbe4e8f 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

Reviewed By: javache

Differential Revision: D3365373

Pulled By: nicklockwood

fbshipit-source-id: 66d149eb80c5c6725311e1e46d7323eec086ce64
2016-05-31 10:28:25 -07:00
..
Accessibility.md React.findNodeHandle -> ReactNative.findNodeHandle 2016-04-07 19:44:31 -07:00
AndroidBuildingFromSource.md Cross platform ActivityIndicator 2016-05-26 13:58:17 -07:00
AndroidUIPerformance.md CI now builds docs website and deploys it to /%version% path 2016-02-11 06:17:42 -08:00
Animations.md Fixed broken link in Animations documentation 2016-05-26 09:28:25 -07:00
Colors.md Add support for number as colors 2016-02-08 04:04:38 -08:00
CommunicationIOS.md Codemod import React from 'react-native' 2016-04-25 22:08:46 -07:00
Debugging.md Update Debugging.md 2016-04-22 10:54:21 -07:00
DirectManipulation.md Fixes syntax typo in DirectManipulation section of docs 2016-05-18 19:43:39 -07:00
EmbeddedAppAndroid.md Fix Gradle setup in 'Integrating with existing apps' 2016-05-25 13:43:27 -07:00
EmbeddedAppIOS.md Explain custom configuration debugging gotcha 2016-05-05 18:00:19 -07:00
GestureResponderSystem.md CI now builds docs website and deploys it to /%version% path 2016-02-11 06:17:42 -08:00
Images.md Add note about adding new images 2016-03-06 02:07:23 -08:00
IssueGuidelines.md Add instruction on how to have access to the bot in IssueGuidelines.md 2016-05-05 08:46:54 -07:00
JavaScriptEnvironment.md Add Array.prototype.includes polyfill 2016-05-25 11:58:24 -07:00
KnownIssues.md Android Slider is now open sourced 2016-04-07 07:29:28 -07:00
LinkingLibraries.md Updated Linking and PushNotificationIOS modules to use NativeEventEmitter 2016-05-27 10:28:23 -07:00
MoviesExample.json Fix typo and add comments to the example app 2015-03-27 20:44:20 +00:00
NativeComponentsAndroid.md Update docs for creating an android native view 2016-04-29 08:16:23 -07:00
NativeComponentsIOS.md Updated iOS native UI component events documentation 2016-04-29 05:11:59 -07:00
NativeModulesAndroid.md Removed repeated "To" 2016-05-03 21:55:24 -07:00
NativeModulesIOS.md Added objective-c class/module semantics 2016-03-08 07:07:27 -08:00
NavigatorComparison.md Update NavigatorComparison.md 2016-04-10 11:51:18 -07:00
Network.md Update XHR information for Android. 2016-05-24 19:28:59 -07:00
Newsletter.md Introduce blog 2016-03-24 14:11:30 -07:00
Performance.md Typo fix. 2016-05-10 22:45:21 -07:00
PixelRatio.md Move around the docs a bit 2015-03-25 11:52:29 -07:00
PlatformSpecificInformation.md Changed module name from 'ReactNative 2016-05-24 08:13:22 -07:00
PullRequestGuidelines.md Tweak commands and guidelines 2016-03-20 13:14:25 -07:00
QuickStart-GettingStarted.md Mentioned Google emulator instead of genymotion 2016-05-27 04:58:29 -07:00
RunningOnDeviceAndroid.md Refactor getting started navigation and information based on platform 2016-05-05 20:26:22 -07:00
RunningOnDeviceIOS.md CI now builds docs website and deploys it to /%version% path 2016-02-11 06:17:42 -08:00
SampleApplication-F8App.md Core components tutorial 2016-05-17 18:28:23 -07:00
SampleApplication-Movies.md Core components tutorial 2016-05-17 18:28:23 -07:00
SignedAPKAndroid.md Option to not store credentials in file 2016-04-21 04:08:23 -07:00
Style.md CI now builds docs website and deploys it to /%version% path 2016-02-11 06:17:42 -08:00
Testing.md Add scripts for running tests locally 2016-05-04 08:58:18 -07:00
Text.md iOS: Enable views to be nested within <Text> 2016-05-31 10:28:25 -07:00
Timers.md Add timer usage for es6 2016-03-26 05:42:26 -07:00
Troubleshooting.md Fixes a minor typo in docs/Troubleshooting.md 2016-04-17 20:42:21 -07:00
Tutorial-CoreComponents.md Core components tutorial 2016-05-17 18:28:23 -07:00
Upgrading.md CI now builds docs website and deploys it to /%version% path 2016-02-11 06:17:42 -08:00
Videos.md Introduce blog 2016-03-24 14:11:30 -07:00