I have a UITableView with images like photo album, images are loading with lazy loading. I want to load more images while scrolling to the bottom of the tableview or when the last row of the table view reached. How can I do this?
-
please be clear..what is the output u want.. – AppleDelegate Sep 27 '12 at 12:32
-
I want to load more images while the user scrolls to the bottom of the tableview. How can i find out whether the end of the table is reached or not ? – Dev Sep 27 '12 at 12:51
3 Answers
Check this
http://developer.apple.com/library/ios/#samplecode/LazyTableImages/Introduction/Intro.html
and this Lazy load images in UITableView

- 1
- 1

- 416
- 2
- 10
UITableView already does lazy loading for you. It will only ask for the visible cells. If you are taking about adding more images to the table while the user is scrolling, you can implement UIScrollViewDelegate methods to calculate the current scrolling position, and when the user reaches certain point, add more images to the NSMutableArray on your datasource.

- 4,412
- 1
- 12
- 14
You can use SDWebImage.
This library provides a category for UIImageVIew with support for remote images coming from the web.
It provides:
An UIImageView category adding web image and cache management to the Cocoa Touch framework
An asynchronous image downloader
An asynchronous memory + disk image caching with automatic cache expiration handling
A guarantee that the same URL won't be downloaded several times
A guarantee that bogus URLs won't be retried again and again Performances!

- 4,779
- 1
- 20
- 40