Is there any way I can have an object receive a message when the user changes the selected row in the picker view? My pickerview has two components and it is dismissed when the user taps the screen once. But I need to gray out certain options in the second component depending on which option in the first component is chosen.
One other option is to use a timed function to periodically check which row is selected, but that’s really hacky. Are there any delegate functions I can use?
UIPickerView has a delegate that you can use, called UIPickerViewDelegate. In it, there is a method called:
That lets you know what row they’ve selected and in what component, and should accomplish what you’re asking, if I understood correctly.