Before you dive in…
The ControlState is by Default set to Normal with an Image set
When a user clicks a button it changes the image of the button since i set the target of that button to correspond with the required method. I need to change the image of all other RADIOBUTTONS when the -(void)RADIOBUTTONAClicked: is called
-(void)RadioButtonACLicked:{
//code to change radioButton A, the code i have works
// Code to change all other buttons does not work.
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
….
// Configure the cell…
....
//-------------Creation of Custom Buttons-------------//
//----RadioButtonA----//
....
[radioButtonA addTarget:self action:@selector(radioButtonAClicked:)forControlEvents:UIControlEventTouchUpInside];
[radioButtonA setImage:img2 forState:UIControlStateNormal];
ButtonB creation
radioButtonB = [UIButton buttonWithType:UIButtonTypeCustom];
[radioButtonB addTarget:self action:@selector(radioButtonBClicked:)forControlEvents:UIControlEventTouchUpInside];
[radioButtonB setImage:img2 forState:UIControlStateNormal];
so when a radioButton is clicked i need all other buttons Image to set to opposite.
Took me awhile got it to work