I am trying to disable particular row in pickerView.
I have an array of strings for pickerView. I am appending values in array1 when user selects particular row.
After that I want to do that when user again opens pickerView if array1 has values of array, pickerView's that value should be disabled.
How can I do that?
Option 1: Disabling an element
You can give the title a greyed out style with the method pickerView:attributedTitleForRow:forComponent:
Then you can change to a defaut value when that item is selected using pickerView:didSelectRow:inComponent:
Option 2: Delete the item
The second option would be to just remove the item from the possible options by adjusting your datasource.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With