0
這可能是一個學校的男孩錯誤,但我想嵌入一個UIAlertView之後有人選擇一個不屬於地址的peoplePickerNavigationController中的聯繫人屬性。我做錯了什麼是'代表'未申報的錯誤!有人能夠從概念上告訴我爲什麼這不起作用,因爲我已經將自己變成了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;
}