DateTimePicker - 设置背景颜色 IOS [英] DateTimePicker - set background color IOS
本文介绍了DateTimePicker - 设置背景颜色 IOS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用 Expo 内部库@react-native-community/datetimepicker"中的 DateTimePicker - 但是我似乎无法将背景颜色从浅灰色更改为如图所示.是否可以在 IoS 上这样做?
Im trying to use a DateTimePicker from the library '@react-native-community/datetimepicker' from within Expo - however I can't seem to change the background color from the light grey as pictured. Is it possible to do so on IoS ?
推荐答案
是的.您可以使用 style
属性,如 文档.
Yes. You can use the style
prop, as can be seen in the documentation.
我想是这样的:
<RNDateTimePicker style={{backgroundColor: "blue"}} />
这篇关于DateTimePicker - 设置背景颜色 IOS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文