Juanjo
Juanjo

Reputation: 969

Best way to load a lot of images from a server in iphone

I'm developing an app and one of its features is similar to twitter,so I have a table with each "tweet" and I display the user's picture too and I don't know what is the best way to load a lot of pictures. The images come from the server as an url.

My app's structure is:

1- I call to the server, and I get the response

2- I parse the response and I iterate it creating objects

3- I load that objects in the tableview's store

4- I reload the table

I thought one way is when I am creating the object, I load the image and I assign to the object's attribute. I mean, each time I create a object type "tweet" for example, I create the image calling the url with nsdata...

I dont know if that solution is correct or can be better. Can anyone give me a hand? Thanks in advance

Upvotes: 0

Views: 218

Answers (1)

EarlyRiser
EarlyRiser

Reputation: 736

Take a look at the SDWebImage API. It will do much of this automatically for you.

Upvotes: 1

Related Questions