J'ai un champ de texte dans un UItableview. L'utilisateur clique sur le champ de texte et je veux qu'un UIpickerview fasse une popup avec les données de NSArray. J'ai essayé de l'implémenter mais l'application plante. Veuillez trouver ci-dessous mon code.UIPclassement sur textField cliquez sur
- (NSString*)pickerView:(UIPickerView*)pv titleForRow:(NSInteger)row forComponent:(NSInteger)component
{
return [policyarraycount objectAtIndex:row];
}
- (NSInteger)numberOfComponentsInPickerView:(UIPickerView*)pv
{
return 1;
}
- (NSInteger)pickerView:(UIPickerView*)pv numberOfRowsInComponent:(NSInteger)component
{
return [policyarraycount count];
}
- (void)pickerView:(UIPickerView *)pv didSelectRow:(NSInteger)row inComponent:(NSInteger)component {
txtPolicy.text = (NSString *)[policyarraycount objectAtIndex:row];
}
S'il vous plaît laissez-moi savoir où je me trompe.
Merci