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