title: Managing retina UIButton image sizes
body: <p>I am a bit confused on managing the different sized images with retina and non-retina displays.</p>
  
  <ol>
  <li><p>I add a custom button in Storyboard and add some text and then add the backgroundimage, which is a vector done in Illustrator (Width: 630 / Height:130):</p>
  
  <pre><code>UIImage *img = [UIImage imageNamed:@"iPad1_orange_button.png"];
  [myButton setBackgroundImage:img forState:UIControlStateNormal];
  </code></pre></li>
  </ol>
  
  <p>the button shows up:</p>
  
  <p><img src="https://i.stack.imgur.com/SFFWc.png" alt="enter image description here"></p>
  
  <p>...the button comes out very small. </p>
  
  <p>I have another image with the @2x for retina but that comes out the same size. </p>
  
  <p>My question is how to manage the sizes of the buttons in regards to image size. DO i need to set the size of the button manually?</p>
  
  <p>Also, when i create a button in Illustrator with the same pixel size as the button i use in XCODE and export it as .png, add it to XCODE and drag it into Storyboard it comes out very large.</p>