I'm using UIPickerView with (for example) 4 rows. The first value is "Pick a value" with gray text. The others are values the user should pick with black text.
The picking is optional, so users could just skip it. But if they don't, how to make first value unselectable back after user will start picking?
Thanks. Regards.
Use the UIPickerView delegate method
- (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component
to change the selected row if the first row is selected :Edit : you may be able to change the text color using this :
This is if you target iOS 6+, and it replaces the previously used
-pickerView:titleForRow:forComponent:
method.