My idea is to add generated integer value to the name of UIImageView. Here is an example: I have three UIImageViews named imageView1, imageView2, imageView3. When a button is pressed I have there this simple code:
self.value = value + 1;
(and of course I have this “value” declared) Now I want add some code which says something like:
UIImage *img = [UIImage imageNamed:@"image.png"];
[imageView(value) setImage:img];
So this I want this part of code ...[imageView(value)... to use the value I defined above. How could I do this?
My idea is to add generated integer value to the name of UIImageView. Here
Share
You can set a
tagfor your image views: