Advertise Books Events Forum News Social Networking Support Us

sdkIQ for iPhone
($4.99)

Shape Up
($0.99)

Your First iPhone App
($1.99)

iVidCam Free
(free)

Kid Art
($0.99)

iPUBQUIZ
(£1.19)

ArtStudio
($3.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 07-01-2009, 12:24 PM   #10 (permalink)
ipodishima
Registered Member
 
Join Date: May 2009
Posts: 9
Default

So, i do like this : in - (UITableViewCell *)tableViewUITableView *)tableView cellForRowAtIndexPathNSIndexPath *)indexPath .


Code:
// Asynchrone View yipi
	AsyncUIImageView* asyncImage = [[[AsyncUIImageView alloc] initWithFrame:CGRectMake(0, 0, 60, 60)] autorelease];
    asyncImage.tag = 999;

	if([imageDict objectForKey:[[xmlParser.stories objectAtIndex:storyIndex] objectForKey:@"title"]])
	{
		// load from dict, ie cache	
		asyncImage = [imageDict objectForKey:[[xmlParser.stories objectAtIndex:storyIndex] objectForKey:@"title"]];
	}
	else {
		// load photo from web
		[asyncImage loadImageFromRawURLMadeOfString:[[xmlParser.stories objectAtIndex:storyIndex] objectForKey:@"article-body"]];
		// add into the dict
		[imageDict setObject:asyncImage forKey:[[xmlParser.stories objectAtIndex:storyIndex] objectForKey:@"title"]];
	}
with a NSMutableDictionary, of course.

I have to improve how i put the photo into the dictionary, because if i save into a .plist, i don't want to save all the photos ^^

++
ipodishima is offline   Reply With Quote
 
Enter the iPhone App Challenge!  Win $500!
» Advertisements
» Stats
Members: 24,359
Threads: 39,155
Posts: 171,645
Top Poster: smasher (2,577)
Welcome to our newest member, darksun
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 09:00 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.