Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6647985
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:36:09+00:00 2026-05-26T00:36:09+00:00

I have an UIImageView in my UITableViewCell which is not being displayed. I get

  • 0

I have an UIImageView in my UITableViewCell which is not being displayed. I get the image from the addressbook and save it as NSData but it seems that’s not working.

I have a method getting the image:

if (ABPersonHasImageData(contactrec)){
        CFDataRef imageData = ABPersonCopyImageData(contactrec);
        [person setPic:(NSData *)imageData];
        CFRelease(imageData);
    }

My tableviewcell has the following method who’s cellPic is linked to an UIImageView

-(void)setCellPic:(UIImage *) pic{
    cellPic.image = pic;
}

And finally, I have a contactsArray full of persons and for each row, I do:

Person *persona =[contactsArray objectAtIndex:indexPath.row];
UIImage *contactImage = [UIImage imageWithData:(NSData *)[persona pic]];
[cell setCellPic:contactImage];

When I debug the code, it seems like persona has for a contact whith pic 2000bytes but I think it’s not doing well converting the NSData to UIImage. At least, when I debug the settle setCellPic, it says that cellPic.image is 0x0

Thanks for your help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T00:36:09+00:00Added an answer on May 26, 2026 at 12:36 am

    Solved!
    The problem was with the method setCellPic in the tableviewcell. As the UIImageView had the same cellPic name, the compiler thought I was calling the setter of the cellPic but cellPic wasn’t a UIImage, it’s UIImageView. So I’ve changed the method’s name and it works fine now!
    Thanks anyway!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an UIImageView which I want to rotate a little bit, but I
I have a UIImageView which has a png image sequence loaded into it. My
I created a UITableViewCell in Interface Builder which I have added a UIImageView and
I have a UIImageView showing a image that is larger than it's frame. It's
I have a UIImageView that starts off with an image (loading.png) specified in IB.
I have a UITableView. I place an UIImageView on each row UITableViewCell. I used
Hi have setup a UITableViewCell from a nib file and everything is working as
I have custom UITableViewCell and UIImageView in it. I need to switch the content
I have a UIimageView and I need to give some perspective to the image.
I want to use UITableViewCells within my application which have an image, and that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.