What's new

Making object with variable

Treehugger

iPF Noob
Hi,

I have 9 UIImageView objects in my app.
Now I want to make a loop to change settings on every object.

Is it possible to have a for-loop and use the variable to make the object?

for(i=0;i<10;i++) {

[["object"+i] setBackgroundColor:bg];

}

Something like that. Is this possible? And how can I do that?

Hope someone knows the answer :)
 

Most reactions

Latest posts

Back
Top