views:

149

answers:

1

Hi,

I am not able to get the image of a person from address book. Does anyone knows how to do it?

+3  A: 

Hey,

You can do it like this....

NSData  *imgData = (NSData *)ABPersonCopyImageData(person);

UIImage  *img = [UIImage imgaeWithData:imgData];

where person is of type ABRecordRef. Now as CFData and NSData are

toll-free bridged

, so you can simply type cast CFData to NSData and get the image

Hope this helps.

Thanks,

Madhup

Madhup