As the title says, i need to get the image and put it in an array.
UIImageView *myImage = [[UIImageView alloc] init];
[myImage setImageWithURL:[NSURL URLWithString:@"http://host.com/images/1/1.png"] placeholderImage:[UIImage imageNamed:@"page3.png"]];
[items addObject:myImage];
the problem is that while the image is being loaded, the code continues and nothing gets put in the array, actually I guess an empty UIImageView gets inserted.
How do I go about fixing this?
On a side note I am using iCarousel to display images, in the data source it gets the images array and shows them. Can i modify iCarousel somehow?
Thanks in advance.
You can use the setImageWithURLRequest method to give a success message or execute the UI update when it has finished for example using the following method:
Here is an example (not tested)