How do I reference an instance of a class using its tag?
<p>I have several instances of a UIControl class Foo being instantiated, one instance corresponding to each cell in a UITableView.  The Class has:</p>

<pre><code>BOOL selected;
UIImageView *imageView;
UIImage *imageOne;
UIImage *imageTwo;
</code></pre>

<p>I've assigned each instance a tag:</p>

<pre><code>foo.tag = indexPath.row;
</code></pre>

<p>I would now like to reference the UIImageView.image for a (or several) specific instance(s) by its tag to switch it to the other image.</p>

<p>In my search I've seen things like classes being assigned tags using initWithTag (I assume they're assigning tags)... </p>

<pre><code>SomeClass *someClass = [[SomeClass alloc]initWithTag:1 ...

[someArray addObject: [[SomeClass alloc]initWithTag:2 ...
[someArray addObject: [[SomeClass alloc]initWithTag:3 ... 
</code></pre>

<p>...but I haven't seen how they are later referenced by that tag.</p>

<p>I have seen a reference to getChildByTag which had promise, but I can't find it in the documentation or examples (maybe not iphone).</p>

<p>Does anyone know how reference the imageView.image within an instance using the instance's tag? (the imageView doesn't have a tag) </p>

<p>Thanks</p>
