如果我将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.
更多推荐
发布评论