Store UIButton tag value
<p>Need to store the tag from a clicked button:</p>

<pre><code>- (IBAction)buttonClicked:(id)sender {
    UIButton *button = (UIButton *)sender;
    self.selectedImage = [_images objectAtIndex:button.tag];
}
</code></pre>

<p>Works OK.</p>

<pre><code>- (IBAction)buttonClicked:(id)sender {
    UIButton *button = (UIButton *)sender;
    self.selectedImage = [_images objectAtIndex:button.tag];
    self.selectedTag = button.tag;
}
</code></pre>

<p>Gives "makes pointer from integer without cast".</p>

<p>How should I reference button.tag correctly?</p>
