title: Resizing image to fit UIImageView
body: <p>I am very new to objective c and I'm just getting my bearings. I want to do something really simple but it proves to be quite a challenge:</p>
  
  <p>I am trying to display an image into an <code>UIImageView</code>. The image I'm showing is large and I want it scaled down to fit the <code>UIImageView</code>. I tried setting the <code>AspectFit</code> View mode but the image gets displayed to the original size and is clipped by the <code>UIImageView</code>. My code is below:</p>
  
  <pre><code>- (void)changeImages
  {
      UIImage* img11 = nil;
  
      img11 = [UIImage imageWithContentsOfFile: [[NSBundle mainBundle] pathForResource:@"dog" ofType:@"jpeg"]];
  
      u11.contentMode = UIViewContentModeScaleAspectFit;
      u11.image = img11;
  }
  
  - (void)viewDidLoad
  {
      [super viewDidLoad];
      // Do any additional setup after loading the view, typically from a nib.
  
      [self changeImages];
  }
  </code></pre>
  
  <p>Can anyone shed some light on this please?</p>
  
  <p>Thanks!</p>