-
-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there any way using like 'didselect'?? #30
Comments
Hi @LeeGwangYong, Were you trying to do this with 1 instance of McPicker? My first instinct says show McPicker with Adding a delegate to just listen for |
Yes! I want to use just 1 instance of McPicker. Thank you for your quick response. |
You could also try to subclass McPicker and override the delegate methods. Not sure that'll work but worth a shot. I'd like to keep McPicker simple and easy to use so I sorta shy away from adding things on the limb. |
I added some code at public func pickerView(_ pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) {
self.pickerSelection[component] = pickerData[component][row]
(... update pickerData[1]...)
picker.reloadComponent(1)
picker.selectRow(0, inComponent: 1, animated: true)
pickerSelection[1] = pickerData[1][0]
} it's really cool library |
Thanks @LeeGwangYong! This is a similar request @AlaeddineOuerteni pointed out wanting some control over the delegate too. I'm open to the idea, just curious how to best implement it. My first thought is to have McPicker have its own delegate method(s). Like |
Hello @LeeGwangYong, I have not cut a release yet but you might be interested in #32. It adds a |
#I have two related picker view
first picker : [ [Alphabet, Numbers] ]
second picker : [ [a,b,c, ...] or [1,2,3, ...] ]
if I select 'Alphabet' at first picker, second picker show [a,b,c, ...]
and if select 'Numbers', show [1,2,3, ...]
The text was updated successfully, but these errors were encountered: