我似乎对简单的文本字段有疑问。里面的文字没有换行。我正在 iOS 5s 模拟器上运行。有任何想法吗?
按照此处的教程进行操作:http://www.raywenderlich.com/99473/introducing-react-native-building-apps-javascript
款式:
var styles = StyleSheet.create({
description: {
marginBottom: 20,
fontSize: 18,
textAlign: 'center',
color: '#656565',
},
container: {
padding: 30,
marginTop: 65,
alignItems: 'center',
},
Run Code Online (Sandbox Code Playgroud)
代码:
<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>
Run Code Online (Sandbox Code Playgroud)
我在 rnplayground 模拟器上运行了确切的代码,但文本确实换行正确。如果您有外部 Flex 容器,则可能需要将 flexWrap 属性指定为“wrap”。
| 归档时间: |
|
| 查看次数: |
3837 次 |
| 最近记录: |