datepicker在ios9中不正确 [英] datepicker is incorrect in ios9
问题描述
早上好:)
我在ios 9 swift 2中的日期选择器有问题
i have a problem with my datepicker in ios 9 swift 2
这是我的日期选择器在ios 8 swift 2 [确定]中的样子:
this is how my datepicker looks like in ios 8 swift 2 [OK]:
这是我在ios 9 swift 2中的日期选择器[不确定]:
and this is my datepicker in ios 9 swift 2 [NOT OK]:
有什么想法我可以解决吗?
Any ideas how i can solve it?
推荐答案
在同一单元格中,UILabel和UIDatePicker遇到了类似的问题.
I had similar issue with UILabel and UIDatePicker in same cell.
我发现根据容器视图宽度为UIDatePicker设置巫婆.会导致此错误,例如:
I figure out that setting witch for UIDatePicker based on container view width. Will cause this error, for ex:
- 引导并尾随到容器视图
- 与容器视图相等的宽度
但是当您将宽度设置为:
But when you set width as:
- 给出宽度ex. 400
- 与上面可用的宽度相等
我希望这会对某人有所帮助.
I hope this will help someone.
PS.我设置了灰色背景以获得更好的外观.第一个屏幕截图显示UIDatePicker在渲染方面存在一些问题.我只是猜测.
PS. I've set gray background for better look. First screen shot shows that UIDatePicker have some issues with rendering. I'm only guessing.
这篇关于datepicker在ios9中不正确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!