草庐IT

addressProperty

全部标签

ios - swift : Issue with accessing CFDictionaryRef for ABAddressBookRef

我已经在ObjC中收集了联系人的地址信息,ABMultiValueRefaddressProperty=ABRecordCopyValue(contactRef,kABPersonAddressProperty);CFDictionaryRefdict=ABMultiValueCopyValueAtIndex(addressProperty,0);if(dict){NSString*street=(NSString*)CFDictionaryGetValue(dict,kABPersonAddressStreetKey);}所以,等效的Swift代码是,letaddressProper