title: How to get an image taken from the camera to take up the entire screen
body: <p>I have dragged a UIImageView onto the UIViewController window in storyboard. I used the handles to make it take up the entire window. I set the mode of the UIImageView to "Aspect Fit". My goal is for the picture to take up the entire window when the iPhone is held in the same orientation that the image was taken.</p>
  
  <p>But for some reason there's a little bit of space above and below every image.</p>
  
  <p>Also I have it set up for the navigation bar and status bar to disappear when the user touches the image by using a hidden UIButton. This works okay except that the image shifts down when the navigation and status bars come back into view. The image only shifts down when I have this code:</p>
  
  <pre><code>    self.navigationController.navigationBarHidden = YES;
      self.navigationController.navigationBarHidden = NO;
  </code></pre>
  
  <p>which I use to get the navigationBar to redraw itself below the statusbar because sometimes the navigationbar will be drawn underneath the statusbar (this happens when making the navigationbar and statusbar reappear at the same time.)</p>
  
  <p>How can I make my images display full screen without all these quirks?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>I think it may have something to do with this:</p>
  
  <blockquote>
    <p>The camera's aspect ratio is 4:3 and the screen's aspect ratio is 3:2.
    So there is simply no way for the camera picture to fill the screen
    unless you're willing to crop is to 3:2. To do that, apply an
    appropriate scale transform.</p>
  </blockquote>
  
  <p>is it possible to apply an affinetransform to an image in a uiimageview?</p>