当我像这样使用AddressBook时:
ABAddressBook *ab = [ABAddressBook addressBook];
ABPerson *person = [[ABPerson alloc]init];
[person setValue:lastName forProperty:kABLastNameProperty];
[ab addRecord:person];
[ab save];
我收到了错误:
`Terminating app due to uncaught exception 'NSInvalidArgumentException',reason: '-[__NSCFString count]: unrecognized selector sent to instance 0x1001448a0'`
setValue:forProperty
做什么
答案 0 :(得分:0)
看起来问题出现在
中-[__NSCFString count]
setValue:forProperty
设置属性的值。看起来问题可能是您尝试设置的lastName
对象。