Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

kwarren

Guest
Aug 18, 2007
219
0
markj put up a nice example that's complete if I recall correctly. I developed a similar implementation that does some image caching and what not. Anyway, here's the link he posted:
http://www.markj.net/iphone-asynchronous-table-image/

Thanks, youPhone. However, as far as I understand, my situation is a bit different because the images are part of an RSS feed that is already implemented (successfully) in my app rather than a standalone set of images.

Anyway, if I'm wrong, please correct me, but I think that that's the problem I'm encountering.
 

youPhone

macrumors member
Sep 8, 2008
41
0
The thumbnails are URLs, right? markj's implementation takes an image URL, downloads it, and then loads it into a UIImageView (though it's really a subclass of UIImageView).

It sounds like markj's implementation is exactly what you're looking for, or am I missing something?
 

kwarren

Guest
Aug 18, 2007
219
0
Yeah, they are URLs all thrown together into the one RSS feed. However, since this section of the app is a constantly refreshing (OK, not constantly, but new content is added at least once a day) RSS feed, doesn't that mean that I need to keep the thumbnails with their respective videos? That is, I can't just slap in thumbnail 1's URL in row 1 because eventually the video in row 1 will be in row 2 and so on and so forth. markj's example seems to be dealing with just images, so would that not cause it to not work in my implementation? So I need to somehow use an object/key (like I have for the title, link, and description) to keep everything working as it should? If not, how do I get it so that I may just pull the thumbnails?

That said, perhaps I am not analyzing the situation correctly. As I mentioned, this is my first real app ready for submission, so I could easily be wrong and you could totally be right.

Sorry for all of the questions, but as you can tell, I'm a little lost on this and have already dedicated a few days to this whole thing.
 

youPhone

macrumors member
Sep 8, 2008
41
0
Create a Class (call it XMLFeedItem or something more descriptive) that will be the model for your UITableViewCells. Set up your UITableViewCell so that you have a method like
Code:
- (void) setupCellWithXMLFeedItem:(XMLFeedItem*)anXMLFeedItem

In that method, you will update all UILabels and other Cell elements including the image. If you're using markj's implementation, you'll have a line in this method that does something like:

Code:
- (void) setupCellWithXMLFeedItem:(XMLFeedItem*)anXMLFeedItem
{
	// Setup UILabels and what not
	...
	
	// Setup image
	[self.myAsyncImageView loadImageFromURL:anXMLFeedItem.thumbURL];
}
 

estupefactika

macrumors member
Feb 16, 2009
47
0
Alcobendas (Madrid)
Change your selector to:
Code:
@selector(setupImage:withURL:)
then this should work:
Code:
[callbackTarget performSelector:callbackSelector withObject:thisImage withObject:imageURL]

Yes, it works thank you. I had only problems in debug with breakpoints, I dont know why "EXC BAD ACCESS" appeared me sometimes, when I quit breakpoints it works
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.