CooperRS / RMPickerViewController

This is an iOS control for selecting something using UIPickerView in an UIAlertController like manner
MIT License
381 stars 51 forks source link

UIDatePicker support #21

Closed iltercengiz closed 9 years ago

iltercengiz commented 9 years ago

I have added UIDatePicker support via a type property. In addition to +pickerController; initialiser method, date picker controller can be created by passing RMPickerTypeDate to +pickerControllerWithType: method. +pickerController; method is still available and defaults to RMPickerTypeNormal.

However, there are a few more things to be done for this feature to be considered completed. delegate property can't be set when type is RMPickerTypeDate. I've limited this because RMPickerViewControllerDelegate protocol also includes UIPickerViewDelegate and UIPickerViewDataSource protocols and they are unnecessary for UIDatePicker. Currently I'm using this version with block based APIs and RMPickerTypeDate, but it should be prevented to use delegate-based APIs.

So you may ask me that why am I sending this PR if this feature is not completed. I'm sending this to ask for help and make an awareness of a feature like this. I'm kind of got stuck with delegate-block based API support for RMPickerTypeDate, as I can't decide what to do.

If you also give some advices or send another PRs based on this, I'd be happy to help in completing this feature.

CooperRS commented 9 years ago

Hi,

thanks for your thoughts on RMPickerViewController and your PR! Do you know my other control called RMDateSelectionViewController?

The reason why I'm maintaining two controls here, is the delegate problem. Couldn't find a good solution for this :/

iltercengiz commented 9 years ago

Oh my god. I feel so bad right now. :smiley: I know RMPickerViewController for a long time and didn't think of any other options. Now I'm diving into RMDateSelectionViewController. :smiley:

btw, keep up the good work :+1: