Cela peut être une erreur d'écolier, mais j'essaie d'intégrer un UIAlertView après que quelqu'un ait sélectionné une propriété de contact dans le peoplePickerNavigationController qui n'est PAS une adresse. Qu'est-ce que je fais de mal pour obtenir une erreur non déclarée 'déléguée'! Quelqu'un pourrait me dire conceptuellement pourquoi cela ne fonctionne pas comme je l'ai fait soi-même un UIAlertViewDelegate et fait les bonnes choses! Merci à l'avance :-)Problèmes avec affichage d'alerte, erreur non déclarée 'délégué'
- (BOOL) peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker
shouldContinueAfterSelectingPerson:(ABRecordRef)person
property:(ABPropertyID)property
identifier:(ABMultiValueIdentifier)identifier {
UIAlertView *alert;
if (property == kABPersonAddressProperty)
NSLog(@"ZOMG YOU PRESSED FOR AN ADDRESS!!");
else {
alert = [UIAlertView alloc];
[alert initWithTitle:@"Invalid Address" message:@"Please pick an address from a contact": delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alert show];
[alert release];
}
[self dismissModalViewControllerAnimated:YES];
return NO;
}