views:

28

answers:

1

Hi

In my iPhone app, I have a number of UIImageView that do the same thing, then a second load which do the same thing. Can I some how tag/group these so that I can simply reference all the objects with one name? Otherwise it means having to have dozens of lines of code for a single repetitive action.

Thanks!

A: 

You could place all the UIImageViews in one super UIView. Depending on what you want to do, you could for example easily hide all objects inside the UIView with one line of code.

hanno
Well say I have these UIImageViews: 1-1, 1-2, 1-3 and 2-1, 2-2 and 2-3. I need to check to see if any from group one have collied with any from group two. But it takes many repetitive lines to check this, which is why I would like to find a way of using one universal name for each group.
Josh Kahane
How about two arrays of UIImageViews and two loops?
hanno