UIDatePicker Cut Off Text&没有显示天数 [英] UIDatePicker Cutting Off Text & Not Displaying Days

查看:119
本文介绍了UIDatePicker Cut Off Text&没有显示天数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用突然无法正确显示UIDatePickers。我正在使用故事板。 Datepickers设置为仅显示日期。他们正在切断月份,甚至还没有显示日子。中间有一个很大的空间。我已经尝试清理项目,重置模拟器,检查本地化设置,并检查是否设置了动态类型大小。我正在使用Xcode 5.1.1,但在Xcode 6的测试版中也会发生同样的事情。任何建议都会受到赞赏。

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 also not even showing the days. There's a big space in the middle. I have tried cleaning the project, resetting the simulator, checking localization settings, and checking to see if dynamic type size was set. I'm using Xcode 5.1.1 but the same thing happens in the beta of Xcode 6. Any suggestions would be appreciated.

推荐答案

好的,我认为它出。这是因为尝试在tableView背景颜色上使用UIAppearance。这与表面上的tableViews无关,但Apple必须私下使用tableView作为PickerViews。因此,我尝试通过tableView背景颜色上的类别设置UIAppearance似乎做了一些意想不到的事情。学过的知识。不要在没有官方支持的情况下尝试使用UIAppearance。

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.

这篇关于UIDatePicker Cut Off Text&没有显示天数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆