Saturday 10 August 2013

Flash Load UITableViewCell Image

Objective

Many times you saw while scrolling UITableView that images you are setting using url in UITableViewCell is causing disturbance in the scroll.

This is because of While scrolling it is fetching data from Internet that hold it until it fetches data for particular cell.And every time when you scroll UITableView it will fetch data from internet.

So lets use a file that will fetch data for us while tableView is scrolling.Just initialize and call it with url to fire and View to set Image in to.

It will automatically set fetched Image to your passed View (that you have passed as parameter to this file while initiating it).

Have a look at these files

Header File



Implementation File





How to use 

Import header file where you need to use

#import "FlashLoad.h"

As we are using in cellForRowAtIndexPath so lets point you eye to following piece of code