I am going to addObject
of 8 UIImageView *
to a NSMutableArray
. Each UIImageView
is User Interaction Enabled.
When a user touches one of the UIImageView
s, what is the best way to recall the index position of the selected UIImageView' in the
NSMutableArray`?
I can imagine:
- sub-class
UIImageView
and add aNSUInteger
index attribute - traverse the
NSMutableArray
and compare eachUIImageView *
pointer
Is there an better alternative?