title: How to use edge insets in iOS?
body: <p>How would I use edge insets to make an image fit inside a button? I'm not sure what values to use for the arguments in UIEdgeInsetsMake(). Could I somehow use the button's width and height to set them?</p>
  
  <p>I want the button to just be an image when not selected. I understand how to do the "when not selected" part, but I have no idea how to use edge insets nor what the term exactly means.</p>
  
  <p>I have this at the moment:</p>
  
  <pre><code>image = [image resizableImageWithCapInsets:UIEdgeInsetsMake(&lt;#CGFloat top#&gt;, &lt;#CGFloat left#&gt;, &lt;#CGFloat bottom#&gt;, &lt;#CGFloat right#&gt;)];
  
  [button setImage:image forState:!UIControlStateSelected];
  </code></pre>
  
  <p>Also, how would I revert to using no image once the button becomes selected?</p>