title: Xcode radio buttons- Changing background image of a button when another button is pressed
body: <p>I'm trying to implement my own basic radio buttons, such that only one of them can be selected at a time.
  Here's the code I'm using-></p>
  
  <pre><code>- (IBAction)btn2Pressed:(UIButton *)sender {
      [btn1 setBackgroundImage:[UIImage imageNamed:@"circle-uncheck.png"] forState:UIControlStateNormal];
      btn2pressed = YES;
      btn1pressed = NO;
  }
  
  
  - (IBAction)btn1Pressed:(UIButton *)sender {
      [btn2 setBackgroundImage:[UIImage imageNamed:@"circle-uncheck.png"] forState:UIControlStateNormal];
      btn1pressed = YES;
      btn2pressed = NO;
  }
  </code></pre>
  
  <p>But it's not working, i.e. the image of the other button isn't changing. :(</p>
  
  <p>I'm not able to figure out what I'm doing wrong.</p>