Is it possible to disable selection in a specific UIPickerView element?

I can find a message that will teach you how to use the delegate method to check the correctness of the line and then scroll it to the right, if not.

But that I do not want. Is it possible to disable a specific row after pickerView initialization? Like the "gray" line and can not stop the indicator on it.

Thanks, experts.

+6
source share
2 answers

There are two parts to this.

+10
source

You can also just leave a gap in the implementation, for example:

 - (void)pickerView:(UIPickerView *)thePickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component { if(row==0){ //Code } if(row==1){ //BLANK } if(row==2){ //Code } 
0
source

Source: https://habr.com/ru/post/898178/


All Articles