I have some images in the array in the form of NSDATA.and i am showing them on page in page controller example 6 at a time.
But they are taking time to get convert in to
From http://www.switchonthecode.com/tutorials/loading-images-asynchronously-on-iphone-using-nsinvocationoperation :
In your main thread:
NSOperationQueue *queue = [NSOperationQueue new];
NSInvocationOperation *operation = [[NSInvocationOperation alloc]
initWithTarget:self
selector:@selector(loadImage)
object:nil];
[queue addOperation:operation];
[operation release];
Other methods required:
- (void)loadImage {
NSData* imageData = //however you're getting your NSData
UIImage* image = [[[UIImage alloc] initWithData:imageData] autorelease];
[imageData release];
[self performSelectorOnMainThread:@selector(displayImage:) withObject:image waitUntilDone:NO];
}
- (void)displayImage:(UIImage *)image {
[imageView setImage:image]; //UIImageView
}