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 4618990
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T02:21:49+00:00 2026-05-22T02:21:49+00:00

I want to display an image that is being retrieved from core data and

  • 0

I want to display an image that is being retrieved from core data and every single cell will have a different image. I have done this but I do not know how to retrieve from this path and place the image into the cell. Anybody can help me on this? Thanks in advance.

 NSString * filePath = @"01.jpg";
NSData * imageData = UIImageJPEGRepresentation([UIImage imageNamed:filePath], 0.1);
[productInfo setValue:imageData forKey:@"productImage"];
  • 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-22T02:21:50+00:00Added an answer on May 22, 2026 at 2:21 am

    You could fetch the managed object from your model and place it in the array where the array would contain the photo names as below. I am assuming that your entity be photoStore and the column for storing the photo file name be nameOfPhoto, so the code would look like,

    NSFetchRequest *fetchRequest=[[[NSFetchRequest alloc] init] autorelease]; 
    NSEntityDescription *entity=[NSEntityDesription entityForName:@"photoStore" inManagedObjectContext:self.managedObjectContext];
    [fetchRequest setEntity : entity];
    NSArray fecthedObject = [fetchRequest executeFetchRequest:fetchRequest error:nil];
    for(NSManagedOect *photos in fetchedObect)
    {
      [self.arrayOfImageNames addObject : [photos valueForKey :@nameOfPhoto"]];
    }
    

    Now, inside the cellForRowAtIndexPath use the image name to add the image to your cell’s imageview as,

    NSString *imagePath = [NSHomeDirectory() stringByAppendingString : [[self.arrayOfImageNames objectAtIndex:indexpath.row] stringByAppendingPathComponent:"jpg"]];
    cell.imageView.image=[UIImage imageNamed:imagePath];
    

    This is how you would add the store the image name into core data and then retrieve the name construct a path to it and display it.

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

Sidebar

Related Questions

I want to display tabular type data, but it will not be coming from
I want to display an image at 'true size' in my application. For that
I want to display a thumbnail image in a cell of tableViewController , this
I have this div: <div class=inauguration-image> I do not want this text to display,
I have an application that receives a pointer to JPEG data from a camera
I want to display an image within a scroll area. The view port of
I want to display the TIME field from my mysql table on my website,
i want to display some information in a listview using the GridView. i have
I'd like to get the image that is being displayed on the UIImagePickerController when
I am just starting to build an app that will display PDF documents. I've

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.