title: How to change image set on Button
body: <p>I want to change the button image on buttons click event. Here is what i am trying.</p>
  
  <pre><code>-(IBAction)editObjectImage:(id)sender
  {
      if (editButtonState == NO)
      {   
          [editButton setImage:nil forState:UIControlStateNormal];
          [editButton setImage:[UIImage imageNamed:@"done2.png"] forState:UIControlStateNormal];
      }
      else
      {
          [editButton setImage:nil forState:UIControlStateNormal];
          [editButton setImage:[UIImage imageNamed:@"edit.png"] forState:UIControlStateNormal];
      }
  }
  </code></pre>
  
  <p>But my Button image is not changing. What's wrong with code?</p>