Important facts about commercial licenses

  • Licenses are perpetual. They do not expire and do not need to be renewed.
  • Licenses can be upgraded. You can upgrade to a more expensive license later paying only the difference in cost.
  • Pay attention to the distribution type - Hosted (sites / servers), binary (applications) or source (includes all the others). Choose according to your needs (more below).
  • All licenses allow commercial use unless otherwise indicated.
  • Read the full license by clicking on the icon.
  • Read more about licenses in our handy license guide.
Free

MIT license

The MIT license is an
open-source license.
You need to log-in or create an account
  • Create an account
  • Log-in
  • Please use your real name.
  • Account activation link will be sent to this address.
  • Minimum 8 characters

Clicking this button confirms you read and agreed to the terms of use and privacy policy.

(13 ratings)

Scroll Lazy Image Load for iOS

Scroll Lazy Image Load for iOS
Developed by Max Johnson, Released May 9, 2012

A UIScrollView component that lazy loads images as the user scrolls the view horizontally.

Objective-C

Tags: lazyload , loadimages , scrolllazyload , uiscrollview

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.

Functionality

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.

Back to top

Usage

Create a controller that implements ScrollLazyloadViewController.

In addition, the following classes must be implemented:

  1. Model class named ClsImgs
  2. UIView class named LazyloadView
  3. NSObject class named ImageDownloader

Implement ImageLazyLoadDelegate and create the properties included in ScrollLazyloadViewController.h :

@interface ScrollLazyloadViewController : UIViewController 

Modify objClsImgs.strURL in -(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 function.

In -(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 objClsImgs.strURL for NSURLRequest in NSURLConnection.

- (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.

View all 9 reviews »

User Reviews

Read all 5 comments »

Questions & Comments


Or enter your name and Email
  • anu 9 months ago
    plz tell me how to add images in scrollview plz it's very urgent plz plz
    • Max Johnson Developer 9 months ago
      There is function like -(void)loadScrollImages in main Controller. This function will add number of images in one array.. and please see -(void)setImageScrollView, It will add images to ScrollView.
    • anu 9 months ago
      Thanks it is woring but in scroll view images are not display in order
  • hiren 11 months ago
    Great work and thanks a lot.
  • nikhil dhamsaniya 1 year ago
    pretty handy thanks a lot...
You must be logged-in to vote. Log-in to your account or register now.