gpt4 book ai didi

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

转载 作者:技术小花猫 更新时间:2023-10-29 11:10:57 25 4
gpt4 key购买 nike

我正在为 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com