ios - What's the best design pattern for scrolling images in UITableViewController? -


i've created app uses table view show images. these images stored in database. however, now, not scalable application because i'm querying 25 images , storing them array , putting them in table view. if had 100,000 images not practical. thinking accommodate lot of images following:

1) first query 25 images , store in array , view them in table view.

2) then, scroll down table view query next 25 images while i'm scrolling down.

3) when scrolled down past first 25 images, delete first 25 images beginning.

4) then, start again @ step 1 until there no more images in database

if scroll up, opposite, , query last 25 images (remembering put them in reverse order in array of course).

i'm sure problem has been solved before, i'm not sure if solution okay. guys think scalable? if not, problems run doing , what's better way it? thank help.

a simpler pattern load more images once user has scrolled bottom of app, i.e. once scroll bottom see spinner , load out next 25 images. not need deleting older images out of memory. pattern i've seen used in many mobile apps , own apps.


Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -