how can i use kABPersonImageFormatThumbnail or something else to set an image to a contact in address book???
I want use a /resources file.
Now i use
ABMultiValueAddValueAndLabel(multiPhone, @"+39-02-1234567", kABWorkLabel, NULL);
to set a value in address book.
An image seems to be the same behavior, but what type need use?
ABMultiValueAddValueAndLabel(multiPhone, ?????, kABPersonImageFormatThumbnail, NULL);
Thanks
A
Ouch... resolved!
UIImage *im = [UIImage imageNamed:@"my_image.jpg"];
NSData *dataRef = UIImagePNGRepresentation(im);
ABPersonSetImageData(person, (CFDataRef)dataRef, nil);
>>> objective-c-add-contact-contacts-list
thanks all.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With