To change the state of button highlighted from normal and keeping it hold
<p>I am creating an iphone app where I have used 25 buttons and each button has been shown a background image in its normal mode.I have also set another image on the highlighted mode of the button.</p>

<p>Initially button will be shown in its normal mode 
now I want that when a button is pressed then button should change to its highlighted state so as the other image will be displayed there.
I have done so by doing:</p>

<p><code>button.highlighted = YES;</code></p>

<p>Its working but its sets the highlighted image for a fraction and then again normal state of the button come back. I use the following code to create the buttons.</p>

<pre><code>for (int i=0; i&lt;25; i++) {

    if (i &gt; 0) { 

        if (i%5 == 0) {

            xaxis = 28;
            yaxis = yaxis+42;
        }
    } 

    iconButton[i] = [UIButton buttonWithType:UIButtonTypeCustom]; 
    iconButton[i].frame = CGRectMake(xaxis, yaxis, 50, 40); 
    [iconButton[i] setBackgroundImage:[iconArray objectAtIndex:random] forState:UIControlStateNormal]; 
    [iconButton[i] setBackgroundImage:[tapedIconArray objectAtIndex:random] forState:UIControlStateHighlighted];
    [iconButton[i] addTarget:self action:@selector(changeImage:) forControlEvents:UIControlEventTouchUpInside]; 
    [self.view addSubview:iconButton[i]]; 
    xaxis = xaxis+53; 
} 
</code></pre>

<p>How can i hold the state of the button, I even tried with timer but app get crashed then.
Please help me</p>

<p>Many Thanks in advance</p>
