title: Get width of a resized image after UIViewContentModeScaleAspectFit
body: <p>I have my UIImageView and I put an image into it that I resize like this:</p>
  
  <pre><code>UIImageView *attachmentImageNew = [[UIImageView alloc] initWithFrame:CGRectMake(5.5, 6.5, 245, 134)];
  attachmentImageNew.image = actualImage;
  attachmentImageNew.backgroundColor = [UIColor redColor];
  attachmentImageNew.contentMode = UIViewContentModeScaleAspectFit;
  </code></pre>
  
  <p>I tried getting the width of the resized picture in my <code>UIImageView</code> by doing this:</p>
  
  <pre><code>NSLog(@"Size of pic is %f", attachmentImageNew.image.size.width);
  </code></pre>
  
  <p>But it actually returns me the width of the original picture. Any ideas on how do I get the frame of the picture that I see on screen?</p>
  
  <p><strong>EDIT:</strong> Here's how my <code>UIImageView</code> looks, red area is its <code>backgroundColor</code></p>
  
  <p><img src="https://i.stack.imgur.com/pmZwm.png" alt="enter image description here"></p>