I found this post, and a couple others, on this topic and dug into it a bit since I need checkboxes. This method should work for what you're doing as well. Thanks sukumar, your post pointed me in the right direction, though I found I didn't need this line:
Code:
[button setImage:imageOfClicked forState:UIControlStateSelected];
I just set the images for the button in Interface Builder, then used
Code:
[button setSelected:YES];
to change its "mode".
Have a look at
my tutorial on how to create a simple checkbox in Interface Builder. There is source code in the form of a working Xcode project.