title: How to set size of UIImageView equal to size of UIImage?
body: <p>I have an view controller with <code>UIImageView</code> named <code>someImageView</code>. This image view has no default <code>UIImage</code>. I'm loading <code>UIImage</code> with the code below:</p>
  
  <pre><code>UIImage * myImage = [UIImage imageNamed:@"sampleImage.png"];
  someImageView.image = myImage;
  </code></pre>
  
  <p>The size of <code>sampleImage.png</code> is 320x300. I need to set size of <code>someImageView</code> to size exactly equal to <code>sampleImage.png</code>. I'm trying to do it:</p>
  
  <pre><code>CGRect frame = someImageView.frame;
  frame.size = myImage.size;
  someImageView.frame = frame;
  </code></pre>
  
  <p>But it doesn't work.</p>