What's new
Apple iPad Forum 🍎

Welcome to the Apple iPad Forum, your one stop source for all things iPad. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Making object with variable

Treehugger

iPF Noob
Joined
Dec 17, 2010
Messages
1
Reaction score
0
Location
Amsterdam (The Netherlands)
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

Top