Reputation: 314
I have an UIDatePicker and want to change it's mode on the fly. Basically I have to table view cells, one with the date and another with the time. When I select the first row I want the date picker to display in UIDatePickerModeDate and for the second row it should display in UIDatePickerModeTime.
The UIPickerView provides a reloadAllComponents method, which the date picker does not. So I am kinda of stuck here.
Any help would be appreciated. :)
Upvotes: 1
Views: 5630
Reputation: 55354
The UIDatePicker
conforms to the UIResponder
protocol which has a reloadInputViews
method:
[myDatePicker reloadInputViews];
Upvotes: 5