0

这可能是一个男生错误,但我试图在有人在 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;
}
4

1 回答 1

1

你有一个额外的这里-

message:@"Please pick an address from a contact": delegate:self
于 2010-11-04T01:02:11.817 回答