Reputation: 657
I am trying to make font of UIDatepickerview
bold
and did not find any way of doing it.
I can change color of font as follows
timer.setValue(UIColor.white, forKey: "textColor")
timer.setValue(false, forKey: "highlightsToday")
but I have no idea how to make font bold like HeleveticaNeue-bold
with size 16
Upvotes: 0
Views: 439
Reputation: 1822
For future References:
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.
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.
Upvotes: 2
Reputation: 5554
You cannot, and you should not do this.
Here's the relevant section from the UIKit documentation, https://developer.apple.com/documentation/uikit/uidatepicker
Appearance
The appearance of UIDatePicker is not customizable.
You should integrate date pickers in your layout using Auto Layout. Although date pickers can be resized, they should be used at their intrinsic content size.
As Hermang suggests, if you need a customised version, you should use a third-party control, or customise your own, perhaps starting with UIPickerView
- but that will mean a lot more work!
Upvotes: 0