Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 07-01-2009, 01: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
 

» Advertisements
» Stats
Members: 158,744
Threads: 89,200
Posts: 380,559
Top Poster: BrianSlick (7,129)
Welcome to our newest member, Dani77
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 05:04 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.