我有一些地址簿搜索的代码:
ABAddressBookRef ab = ABAddressBookCreate();
NSString *matchStr = [NSString stringWithFormat:@"%@ %@", firstName, lastName];
CFStringRef namestr = (CFStringRef)matchStr;
CFArrayRef matched = ABAddressBookCopyPeopleWithName(ab, namestr);
最后一行给出了警告:Initialization from incompatible pointer type
。
任何想法为什么?
答案 0 :(得分:0)
这段代码对我来说很好,因为它似乎为史蒂文做了。您可能会对靠近该部分的代码发出警告,您错误地将其归因于最后一行。