Search code examples
iphonecocoa-touchuipickerviewuidatepicker

UiDatePicker displays but not 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?


Solution

  • 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.