title: Preventing UIImage resize for a UIButton
body: <p>I have a UIButton with no text and have 2 images I'd like to use (one for normal state and the other for selected state). The images are smaller than the button size. </p>
  
  <p>How do I ensure that neither of the images are scaled when the button is drawn? Setting the imageView properties only change the scale correctly for normal state but not for selected.</p>
  
  <pre><code>    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
  
      [button setImage:imageNormal forState:UIControlStateNormal];
      [button setImage:imageSelected forState:UIControlStateSelected];
  
      // this shows the correct scale in normal mode but not when button is tapped
      button.imageView.contentScaleFactor = 1.0;
      button.imageView.contentMode = UIViewContentModeCenter;
  </code></pre>