Is it possible to dynamically filter the selection from one side with the other?
For example
| car types | color |
| Toyota | Blue, Yellow |
| Ford | Green, Orange, Purple |
| Ferrari | Red, Green, Yellow |
So when the UIPickerview is displayed, I can select the different types of cars. Upon selecting the type of car, I want to be able to only choose the specified colors.
At the moment I can just load all the car types and only one range of colors when the UIPickerView is displayed. I don’t know if its possible to dynamically generate the right hand side with the option on the left.
It’s actually quite simple to do. You need to return the relevant colours for
component 1depending on what is selected incomponent 0, e.g.:Then implement the following:
Obviously this can be optimised, but it shows the idea.