i have a UITableView with 3 UITableViewCells and 3 Picker Views with other data.
Picker1 have Data1
Picker2 have Data2
Picker3 have Data3
this with the code:
- (NSString *)pickerView:(UIPickerView *)thePickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component;
{
if (thePickerView.tag == 1) {
return [data1 objectAtIndex:row];
} else if (thePickerView.tag == 2) {
return [data2 objectAtIndex:row];
} else if (thePickerView.tag == 3) {
return [data3 objectAtIndex:row];
}
return [data1 objectAtIndex:row];
}
i want to change picker view’s data with a UITableViewCell. how i can do that?
Do this create memberVariable NSIndexPath *selectedIndexPath in .h file and make its property.
Now in tableViewDelegate method:
Picker View Delegate method will be like this: