A question related to UIButton
<p>I have taken customview in my code for UIButton.</p>

<pre><code>UIButton *button=  [[UIButton buttonWithType:UIButtonTypeRoundedRect] retain]; 
[button addTarget:self action:@selector(checkedimage:)  forControlEvents:UIControlEventTouchUpInside];

-(IBAction)checkedimage:(id)sender
{
NSLog(@"checkedimage");

if(checkImage == NO)
{
    newImage = [UIImage imageNamed:@"a.png"];
    checkImage=YES;
}
else if(checkImage==YES)
{
    newImage = [UIImage imageNamed:@"b.png"];
    checkImage=NO;
}
}
</code></pre>

<p>but  when i click on UIButton  it is   not   going to action  checkedimage<br>
why?</p>
