Search code examples
iosfontsuilabeluidatepickeruiappearance

Setting custom font for UILabel appearance causes UIDatePicker bug


In my app delegate I set the font and fontColor of all UILabels using [UILabel apperance], but this is causing the font in my UIDatePicker to also change, which Apple don't allow, and for obvious reasons because it makes the datePicker buggy by changing to default font while scrolling and other inconsistent and unintended behaviour.

How do I ignore UIDatePicker to keep it default when setting all UILabels?


Solution

  • The only simple work-around I found was to create the UIDatePicker in code (not using storyboards). I got what I wanted.