UiDatePicker显示但不显示UIPickerView(UiDatePicker displays but not UIPickerView)

编程入门 行业动态 更新时间:2024-10-28 08:20:47
UiDatePicker显示但不显示UIPickerView(UiDatePicker displays but not UIPickerView)

如果我将UIDatePicker放到IB中的UIView并运行应用程序,则会显示日期选择器。 如果我删除了日期选择器,将UIPickerView拖放到同一个UIView并运行应用程序,UIPickerView就不会显示。 有什么不同?

If I drop a UIDatePicker onto a UIView in IB and run the app, the date picker displays. If I delete the date picker, drop a UIPickerView onto the same UIView and run the app, the UIPickerView doesn't display. What is the difference?

最满意答案

我认为问题可能是UIPicker没有什么可挑选的。 UIpicker允许用户从列表中选择项目。 您需要提供一些供用户选择的选项,例如颜色列表,其中datepicker允许用户选择日期,并且它不需要开发人员提供可供选择的事物列表。

I believe the issue might be that the UIPicker has nothing to pick from. The UIpicker lets the user select an item from a list. You need to supply some options for the user to pick from such as a list of colors where as the datepicker lets the user pick a date and it doesnt need the dev to provide a list of things to pick from.

更多推荐

本文发布于:2023-08-05 20:50:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1438092.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:但不   UiDatePicker   displays   UIPickerView

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!