A customizable UIScrollView for lazy loading multiple images. Useful for quickly loading views that contain images loaded from the web. Very simple to add to your application and style to your application look and feel.
When the application loads, activity indicators are shown where images are being downloaded. Once the images are downloaded they will replace the loading indicators.
Clicking on an image will load that image on top of UIScrollView.
Create a controller that implements
In addition, the following classes must be implemented:
Implement ImageLazyLoadDelegate and create the properties included in
@interface ScrollLazyloadViewController : UIViewController
-(void)loadScrollImages to point to your images.
-(void)loadScrollImages function will add all objects of ClsImgs to Array and then It will set UIScrollView using
-(void)setImageScrollView, you can edit width and height of LazyLoadView using
xPos += 68; and
[scrollView setContentSize:CGSizeMake(xPos, 62)]; where 68 and 62 is width and height respectively.
For this you should have to change in your LazyLoadView.xib file accordingly in width or height.
ImageDownloader.h/m are used to download image using
NSURLConnection. where we are passing
- (void)loadImages checks for each image, if it is downloaded or pending.
If Images are not downloaded then It will call
- (void)startIconDownload:(ClsImgs *)pClsImages forImgTag:(NSInteger)pImgTag.
After images are downloaded,
- (void)appImageDidLoad:(NSInteger)pImgTag is called - use that for post load operations.