I had used the below code to get the row index of the picker view with two components. But there is two warnings saying "Local declaration of pickerView hides the instance variable. Anyone please help.
(void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component {
int pos1 = [pickerView selectedRowInComponent:0]; NSLog(@"Row1: %i ",pos1); int pos2 = [pickerView selectedRowInComponent:1]; NSLog(@"Row2: %i ",pos2);
}