- (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component
{
lbl.text = [arr_tmp objectAtIndex:[pickerView selectedRowInComponent:0]];
if([arr_tmp indexOfObject:[arr_tmp objectAtIndex:[pickerView selectedRowInComponent:0]]]==0)
{
// Statement of Condation if Index At 0
}
else if([arr_tmp indexOfObject:[arr_tmp objectAtIndex:[pickerView selectedRowInComponent:0]]]==1)
{
// Statement of Condation if Index At 1
}
else if([arr_tmp indexOfObject:[arr_tmp objectAtIndex:[pickerView selectedRowInComponent:0]]]==2)
{
// Statement of Condation if Index At 2
}
}
NOTE :- arr_tmp is the Array which's elements disply's in Picker View
Loading
No comments:
Post a Comment