UITableView with contact image problems.

Posted by prathumca on Stack Overflow See other posts from Stack Overflow or by prathumca
Published on 2010-03-14T09:16:02Z Indexed on 2010/03/14 9:25 UTC
Read the original article Hit count: 200

Filed under:
|

As par my app requirement, I'm showing the contact images in a UITableView as shown below.

 ABRecordRef contact = [self getContact];
 if(contact && ABPersonHasImageData(contact))
 {
   UIImage *contactImage = [UIImage imageWithData:(NSData*)ABPersonCopyImageData(contact)];
   callImage.image =  contactImage;
 }

I've two problems if I use the above code segment.

  1. Table Scrolling is too slow. If comment the above code, then UITable responds very fast.
  2. Memory Management. My app started using 25 - 30 MB of RAM.

Is there any better way to avoid the above two problems?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about objective-c