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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T01:08:13+00:00 2026-06-14T01:08:13+00:00

I will explain my problem, I hope to find a solution. I’m looking for

  • 0

I will explain my problem, I hope to find a solution. I’m looking for weeks how to fix this, but can not find how to do it, do not want to use external libraries or rare classes.

Explanation:

I have a TableView get the information automatically from XML, the XML all the information I have it parsed and stored in a MutableArray.

The array parses all my XML tags, it is working correctly.

To read a label I do my parser as follows:

//To use this tag Title:

[[self.parseResults objectAtIndex:indexPath.row] objectForKey:@”name_category_ads”];

//To use this image tag:

[[self.parseResults objectAtIndex:indexPath.row] objectForKey:@”image1_category_ads”];

Problem:

The TableView text correctly load my array (Title), but I can not have it load the images from my array in tableview:

I tested my code with a static URL image (an image that is on the website) and asynchronous loading if it works but does not work when I try to do it from my array, that it has different url of the images.

//Example of an image URL Static

NSString *imagenURL=@"http://www.principadoasturias.net/2011/pablo/03_php/archivos/iconos/jpg.jpg";

The code for my table is as follows:

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

static NSString *CellIdentifier = @"Cell";

//My custom cell

Cell_Category_Iphone *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (!cell) {
    cell = [[Cell_Category_Iphone alloc] initWithStyle:UITableViewCellStyleDefault  reuseIdentifier:CellIdentifier];
}

//Image Static URL
NSString *imagenURL=@"http://www.principadoasturias.net/2011/pablo/03_php/archivos/iconos/jpg.jpg";

//Assign the title to my cell, using my array already loaded and parsed.

cell.titleCategoryCell.text=[[self.parseResults objectAtIndex:indexPath.row] objectForKey:@"name_category_ads"];

//Asynchronous loading of image

if (!cell.imageCategoryCell.image) {

dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT,0), ^{

NSData *data =[NSData dataWithContentsOfURL:[NSURL URLWithString:imagenURL]];

dispatch_sync(dispatch_get_main_queue(), ^{
        UIImage *thumbnail = [UIImage imageWithData:data];
        cell.imageCategoryCell.image=thumbnail;
        [self.tableView beginUpdates];
        [self.tableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:indexPath, nil] withRowAnimation:UITableViewRowAnimationNone];
        [self.tableView endUpdates];
    });
});
}

return cell;
}

Rounding out the problem, consisting of:

The code loads the image correctly so asicronica, but a single image that is in a URL, but I can not have it load the images that are in my array.

//My array images

[[self.parseResults objectAtIndex: indexPath.row] objectForKey: @ "image1_category_ads"];

Can you help me? Then share the code for everyone.
Many Thanks

regards Ricardo

  • 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-06-14T01:08:14+00:00Added an answer on June 14, 2026 at 1:08 am

    When you are using the AFNetworking library there is a really nice implementation for that. It is a extension to UIImageView which handles the asynchrony loading for you. You just need to set the URL and that’s a 1-liner. Have a look at UIImageView+AFNetworking at GitHub.

    If you do not want to use AFNetworking library, you may want to have a look at this sample. It is very basic and does the same, but is only one simple class.

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

Sidebar

Related Questions

I am not entirely sure how to explain my problem but I will try.
This problem is going to be hard for me to explain but I will
I will try to explain this the best way I can, but feel free
I have this problem which i find a bit difficult to explain but I
Ok this is strange but I will explain what is going on. In SQL
My problem is very simple to explain but I don't success to find the
I will try to explain my problem as clear as I can. I have
this question might sound a little bit weired... But I will try to explain:
I hope my question is clear from the title. But still I will explain
I have a problem which I can't seem to find a different solution for

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.