林:ABUnknownPersonViewController崩潰使用此代碼顯示出從被從vCard字符串創建一個人記錄的ABUnknowPersonViewController
- (ABRecordRef)person {
if (person == NULL) {
ABPersonCreator *creator = [[ABPersonCreator alloc] initWithVcardString:vcardString];
person = creator.person;
CFRetain(person);
[creator release];
}
return person;
}
- (UIView *)fullscreenView {
unknownPersonController = [[ABUnknownPersonViewController alloc] init];
unknownPersonController.displayedPerson = self.person;
unknownPersonController.allowsAddingToAddressBook = YES;
unknownPersonController.allowsActions = YES;
unknownPersonController.unknownPersonViewDelegate = self;
return unknownPersonController.view;
}
有人可以幫我這個?
THX菲利普
你能告訴你的崩潰日誌? – malinois
***終止應用程序由於未捕獲的異常「NSInternalInconsistencyException」,原因:「 - [__ NSCFDictionary的setObject:forKey:]:突變方法發送到不可變對象」 – plaetzchen