I have an array of objects. My object contains a URL(NSString) and an image (UIImage). I call a webservice to populate all the urls for the images and then I want to asynchronously get the image and update the object with the image.
I am stuck while I am trying to determine the index of the array which I need to update when the data is received from URLConnection. Any thoughts?
You need to map the NSURLConnection to your Array. You could either subclass NSURLConnection to add a member, wich allows storing a tag identifier, such as an index.
Probably it would be simpler to create a NSDictionary, where each NSURLConnection acts as key and the arrayIndex in an NSNumber would be stored as the value.
In the callback-method you are using, you could access your dictionary with the according NSURLConnection as its key.