I have a viewController, in that i have used Page control. and each page have 4 imageViews.
I have passed Xml and according to number of images in that i got the number of pages of pageControl that is (NumberOfImages/4).
I have done my code like this...
first i get url of each images and store them in 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 fetch images from URL.and until all r not fetched i have to wait..
So i want to use Lazy Loading Here..I have show apple Lazy Loading Example for TableView..but not getting how to use it with Paging??
so can anyone suggest me what can i do for this?? any Help is appreciated..