title: viewForZoomingInScrollView working but with extra blank space
body: <p>I am trying to implement default photos app like functionality.</p>
  
  <p>I have added an image view to scroll view and implemented below method:</p>
  
  <pre><code>- (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView
  {
      return self.fileDisplayImageView;
  }
  </code></pre>
  
  <p>Problem is though it is zooming the image, it is adding space around its bounds when zoomed.</p>
  
  <p>Below is the original image:</p>
  
  <p><img src="https://i.stack.imgur.com/gE1ra.png" alt="enter image description here"></p>
  
  <p>Here is the image after zoom, with extra blank space added at top:</p>
  
  <p><img src="https://i.stack.imgur.com/yGnsf.png" alt="enter image description here"></p>
  
  <p>Can any one suggest, how can I resolve this problem?</p>
  
  <p><strong>Update:</strong> Attaching the sample code: <a href="https://db.tt/wrNjTLkV" rel="nofollow noreferrer">ZoomSample</a></p>
  
  <p><strong>Update:</strong> My initial problem is resolves after implementing solution suggested by Robert, thanx to him :-). </p>
  
  <p><strong>Now my new problem is</strong>- image is not appearing at center but is appearing aligned to top:</p>
  
  <p><img src="https://i.stack.imgur.com/CY7SK.png" alt="Image aligned at top"></p>