Sat*_*ram 9 underline ios react-native
我正在为Android和ios做反应原生的移动应用程序.在我的项目中,我正在使用TextInput Component(ios).此组件显示没有下划线.如何在ios中使用带下划线颜色的TextInput.
代码示例 -
<TextInput
ref={'cardbatch1'}
keyboardType = 'numeric'
placeholder = 'Batch Number'
autoCapitalize = 'none'
/>
Run Code Online (Sandbox Code Playgroud)
在样式中试试这个..看看输出的差异
const styles = StyleSheet.create({
inputBox: {
.....
borderBottomWidth: 1,
borderBottomColor: 'gray',
....
}
});
Run Code Online (Sandbox Code Playgroud)
最后在textInput中添加样式
<TextInput
...
keyboardType = 'numeric'
placeholder = 'Batch Number'
autoCapitalize = 'none'
style={styles.inputBox}
.....
/>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
9535 次 |
| 最近记录: |