iOS ReactNative : Text not wrapping and displaying off-screen
<p><p>我似乎有一个简单的文本字段的问题。里面的文字没有换行。我在 iOS 5s 模拟器上运行。有什么想法吗?</p>
<p> <a href="/image/sAZM2.png" rel="noreferrer noopener nofollow"><img src="/image/sAZM2.png" alt="Text Not Wrapping"/></a> </p>
<p>按照此处的教程进行操作:<a href="http://www.raywenderlich.com/99473/introducing-react-native-building-apps-javascript" rel="noreferrer noopener nofollow">http://www.raywenderlich.com/99473/introducing-react-native-building-apps-javascript</a> </p>
<p><strong>样式:</strong></p>
<pre><code>var styles = StyleSheet.create({
description: {
marginBottom: 20,
fontSize: 18,
textAlign: 'center',
color: '#656565',
},
container: {
padding: 30,
marginTop: 65,
alignItems: 'center',
},
</code></pre>
<p><strong>代码:</strong></p>
<pre><code><View style={styles.container}>
<Text style={styles.description}>
Search for houses to buy!
</Text>
<Text style={styles.description}>
Search by place-name, postcode or search near your location!
</Text>
</View>
</code></pre></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>我在 rnplayground 模拟器上运行了确切的代码,但文本确实换行正确。如果你有一个外部 flex 容器,你可能需要将 flexWrap 属性指定为 'wrap'。 </p>
<p> <a href="http://rnplay.org/apps/x0Xf6w" rel="noreferrer noopener nofollow">rnplay.org/apps/x0Xf6w</a> </p></p>
<p style="font-size: 20px;">关于iOS ReactNative : Text not wrapping and displaying off-screen,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/33626132/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/33626132/
</a>
</p>
页:
[1]