title: Possible to reset UIButton background image?
body: <p>I have an application where I initially set a UIButton's background image, and then need to change it to something else later. I do realize I could just remove the original button and allocate a new button with the new image, but I'd prefer to be more efficient and reuse the object that I've already allocated. Is is possible to do this? I noticed that the currentBackgroundImage property is readonly, so when I try stuff like:</p>
  
  <pre><code>        [thumbnailButton setBackgroundImage:nil forState:UIControlStateNormal];
          [thumbnailButton setBackgroundImage:[UIImage imageWithCGImage:[[photos objectAtIndex: currentPhotoIndex] thumbnail]] forState:UIControlStateNormal];
  </code></pre>
  
  <p>or just:</p>
  
  <pre><code>        [thumbnailButton setBackgroundImage:[UIImage imageWithCGImage:[[photos objectAtIndex: currentPhotoIndex] thumbnail]] forState:UIControlStateNormal];
  </code></pre>
  
  <p>I get the following:</p>
  
  <pre><code>*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UITableViewCellContentView setBackgroundImage:forState:]: unrecognized selector sent to instance 0x16c570'
  </code></pre>
  
  <p>Is it possible to accomplish using UIButton or do I just need delete the original button and create a new one?</p>