2
我在实现ABPeoplePickerNavigationControllerDelegate时遇到了这个奇怪的问题。所以标识符有时被得到了它的值不正确地在委托方法ABMultiValueIdentifier在ABPeoplePickerNavigationControllerDelegate中是否设置错误?
- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person property:(ABPropertyID)property identifier:(ABMultiValueIdentifier)identifier;
例如,当我选择从一个相接触的第一数量,标识符应当是0。可是,有时候它是1(即使当接触仅具有1号) !
这是很容易验证,
...
ABMultiValueRef phoneProperty = ABRecordCopyValue(person,property);
int count = ABMultiValueGetCount(phoneProperty);
NSLog(@"How many numbers do I have %d and which number do I choose %d",count,identifier);
它打印出来,这一段
多少个数字我有和数量如何选择
有没有人碰到同样的问题?
更新:有时标识符比count更大。怎么来的!!
多少个数字我有2和数量做我选择3