UIDatePicker Cutting Off Text & Not Displaying Days

前端 未结 2 1675
一个人的身影
一个人的身影 2020-12-19 02:19

My app is suddenly unable to correctly display UIDatePickers. I\'m using storyboards. The Datepickers are set to just display the date. They are cutting off the month, and a

相关标签:
2条回答
  • 2020-12-19 02:56

    Ok, I figured it out. This happened as a result of trying to use UIAppearance on a tableView background color. This has nothing to do with tableViews on the face of it, but Apple must be using a tableView privately for the PickerViews. So, my attempt to set a UIAppearance via a category on a tableView background color seems to be doing something unexpected. Lesson learned. Don't try to use UIAppearance where they are not officially supported.

    0 讨论(0)
  • 2020-12-19 03:10

    I had this exact same issue, and it was related to duplicate constraints in my storyboard. I'd been implementing iPhone 6 widths and inadvertently ended up with both width = 320 and width >= 320. Removing that width = 320 fixed it instantly.

    0 讨论(0)
提交回复
热议问题