title: Objective c How to scale image view size (height) as per image size
body: <p>In my application i have used and image view to display images getting from database</p>
  
  <p>in data base <em>images are having different sizes,</em></p>
  
  <p>for now i added image view with frame (10, 10, 300, 220).</p>
  
  <p><strong>I need to resize the frames of image view as per image size, just like</strong> <em><strong><code>Aspect Fit.</code></em></strong></p>
  
  <p>I know <strong>Aspect fit can able to resize but it do in changing width as per height ratio</strong>,</p>
  
  <p>But i need to increase the height as per width ratio</p>
  
  <p><strong>i need to have width always 300, fixed but need to changes in height</strong></p>
  
  <p>For ex :</p>
  
  <pre><code> if image size is 500x1000 i need to resize imageview as 300x600
   if image size is 400x600 i need to resize imageview as 300x450
  </code></pre>