I have a bunch of images on the screen.... UIImageView *s1, s2 ,s3 etc up to *s10 Now suppose I want to update the image each displays to the same image. Rather than doing s1.image = sampleimage; s2.image = sampleimage; : s10.image = sampleimage;
How could i write a for loop to go from 1 to 10 and then use the loop var as part of the line that updates the image. Something like this. for ( i = 1; i <- 10; ++i ) s(i).image = sample; // I know that does not work
Basic question is how do I incorporate the variable as part of the statement to access the image? Don't get hung up on my example. The main question is how to use a variable as part of the access to some element/object.
Bottom Line... If I can build the name of a UIImageView into a NSString object, How can I then use that NSString object to manipulate the UIImageView.
Thanks!