How to use Lazy Loading in Paging?

I have a viewController since I used the page control. and each page has 4 images.

I went through the Xml and by the number of images in that I got the number of pageControl pages (NumberOfImages / 4).

I made my code as follows:

first i get the url of each image and save it in an array.

for(int i=0;i<[Array Count];i++)
{
imgString=[NSString stringWithFormat:@"%@",[Array objectAtIndex:i]];
NSLog(@"string :%@",imgString);
NSString *abc=[imgString tringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
//NSLog(@"abc :%@",abc);

NSURL *url=[NSURL URLWithString:abc];
NSLog(@"url :%@",url);

NSData *data = [NSData dataWithContentsOfURL:url];

[ImageArray addObject:[UIImage ImageWithData:data]];
}

The above code takes time to retrieve the images from the URL.and until all r are delivered, I have to wait ..

So, I want to use Lazy Loading Here .. I have an application for showing Lazy to load into TableView ... but it doesn’t work, how to use it with Paging?

can anyone suggest me what can i do for this? any help is appreciated.

+3
1

UIImageView , :

tmp - , , .

, .

, , .

, UIImageView, , - .

, , .

.

0

All Articles