这可能是学校男生的错误,但我想在有人选择不是地址的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;
}
答案 0 :(得分:1)
你还有一个额外的: -
message:@"Please pick an address from a contact": delegate:self