これは男子生徒のエラーかもしれませんが、誰かがアドレスではない peoplePickerNavigationController の連絡先プロパティを選択した後、UIAlertView を埋め込もうとしています。「デリゲート」の宣言されていないエラーを取得するために何が間違っていますか! 自分自身を UIAlertViewDelegate にして正しいことをしたので、これが機能しない理由を誰かが概念的に教えてくれませんか! 前もって感謝します :-)
- (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;
}