更改 DatePicker 的字体 [英] Change the font of a DatePicker
问题描述
我已经搜索了几天,但我看不到如何更改 Datepicker 控件的字体和大小.
我可以通过以下方式更改颜色:
datePicker.tintColor = UIColor.blue
但我找不到如何更改字体和大小.
自定义UIDatePicker
虽然建议使用Swift的Native(Default) UIDatePicker
,
然后,如果有人想要,您可以参考以下列表
以下是来自 GitHub 的一些可定制的 Datepicker
.
- https://github.com/squimer/DatePickerDialog-iOS-Swift
- https://github.com/itsmeichigo/DateTimePicker
- https://github.com/hsylife/SwiftyPickerPopover
- https://github.com/EngrAhsanAli/AAPickerView
- https://github.com/dillidon/alerts-and-pickers
- https://github.com/hughbe/day-date-picker
- https://github.com/alikaragoz/AIDatePickerController
- https://github.com/CooperRS/RMDateSelectionViewController
- https://github.com/zhhlmr/ZHDatePicker
- https://github.com/GasimGasimzada/FxDatePicker
- https://github.com/anatoliyv/SMDatePicker
- https://github.com/MarioIannotta/MIDatePicker
<块引用>
注意:但是是的,不要尝试自定义 UIDatePicker
的外观.因为它可能会导致您的应用程序被拒绝的危险未来.
希望这会有所帮助.
I've been searching for days and I can not see how can i change the font and size of a Datepicker control.
I can change the color by:
datePicker.tintColor = UIColor.blue
But I can not find how to change the font and its size.
It is not good to Customise the UIDatePicker
Although it is suggested to use the Native(Default) UIDatePicker
of the Swift,
then also if anyone wants you can refer the following list
Following are some of the Customisable Datepicker
from GitHub.
- https://github.com/squimer/DatePickerDialog-iOS-Swift
- https://github.com/itsmeichigo/DateTimePicker
- https://github.com/hsylife/SwiftyPickerPopover
- https://github.com/EngrAhsanAli/AAPickerView
- https://github.com/dillidon/alerts-and-pickers
- https://github.com/hughbe/day-date-picker
- https://github.com/alikaragoz/AIDatePickerController
- https://github.com/CooperRS/RMDateSelectionViewController
- https://github.com/zhhlmr/ZHDatePicker
- https://github.com/GasimGasimzada/FxDatePicker
- https://github.com/anatoliyv/SMDatePicker
- https://github.com/MarioIannotta/MIDatePicker
Note: But yes do not Try to customise The appearance of
UIDatePicker
.As it might make a danger of rejection of your app in future.
Hope this helps.
这篇关于更改 DatePicker 的字体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!