ios - react-native 中 ios 的 TextInput 下划线颜色

标签 ios react-native underline

我正在为 android 和 ios 做 react-native 的移动应用程序。 在我的项目中,我使用的是 TextInput Component(ios)。该组件没有下划线。如何在 ios 中使用带有下划线颜色的 TextInput。

代码示例-

<TextInput
 ref={'cardbatch1'}                 
 keyboardType = 'numeric'
 placeholder = 'Batch Number'
 autoCapitalize = 'none'                                                    
/>

最佳答案

您可以将 borderBottomWidth 和 borderBottomColor 添加到 TextInput,或者简单地在 TextInput 下方绘制一个高度为 1 或 2 px 的 View 。

关于ios - react-native 中 ios 的 TextInput 下划线颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45079132/

相关文章:

javascript - 如何为所有选项卡设置相同的背景图片? ( react native )

css - 更改悬停在 SCSS/CSS 中自定义颜色的文本选择内的下划线颜色?

css - 文本奇怪的蓝色下划线?

ios - IBAction 在 Xcode 中打开用于表格栏单元格交互的 URL

ios - UIWebview - 加载 PNG 图像 - 出现错误

react-native - 我如何在 React Native Accessibility 中制作 TouchableHightLight(复选框)?

css - 在css中选择字符串的前三个字符

ios - 核心剧情:Memory Issue Core animation failed to allocate so many bytes

ios - Collectionview 单元格之间的最大间距

react-native - 异步存储 {"40":0 ,"_65":0 ,"_55":null ,"_72":null} in React native