deselecting other buttons on click of any one uibutton-iphone
<p>how to deselect another two button on clicking of one button.i am able to change the image of button by clicking them.I have created three buttons from IB.and their ibaction is as follow:</p>

<pre><code>- (IBAction)todaybuttonClicked:(id)sender
{
    todayButton.tag=0;

    NSLog(@"hi todaybuttonClicked");
    if ([sender isSelected]) {
        [todayButton setBackgroundImage:[UIImage imageNamed:@"normal.png"] forState:UIControlStateNormal];

        [sender setSelected:NO];
    }
    else{
        [sender setBackgroundImage:[UIImage imageNamed:@"selected.png"] forState:UIControlStateNormal];
        [sender setSelected:YES];
    }  
        [self todayOffersSegmentSelected];

}

- (IBAction)tomorrowbuttonClicked:(id)sender
{
    tomorrowButton.tag=1;

    NSLog(@"hi tomorrowbuttonClicked");

    if ([sender isSelected]) {

        [tomorrowButton setBackgroundImage:[UIImage imageNamed:@"normal.png"] forState:UIControlStateNormal];

        [sender setSelected:NO];
    }
    else{
        [sender setBackgroundImage:[UIImage imageNamed:@"selected.png"] forState:UIControlStateSelected];
        [sender setSelected:YES];

    }
    [self tomorrowOffersSegmentSelected];
}

- (IBAction)restoftheweekbuttonClicked:(id)sender
{
    restoftheweekButton.tag=2;

    NSLog(@"hi restoftheweekbuttonClicked");

    if ([sender isSelected])
    {
        [restoftheweekButton setBackgroundImage:[UIImage imageNamed:@"normal.png"] forState:UIControlStateNormal];

        [sender setSelected:NO];

    }

    else{

        [sender setBackgroundImage:[UIImage imageNamed:@"selected.png"] forState:UIControlStateSelected];

        [sender setSelected:YES];

    }
    [self restOfWeekOffersSegmentSelected];

}
</code></pre>

<p>any suggestion??
Thanks</p>
