title: Content of UIScrollView has offset below Navigation Bar
body: <p>I have a UIScrollView which contains a UIView, that in turn has an UIImageView and several UIButtons in it.
  The problem I have is that the image is displayed about 20 px underneath my navigation bar.</p>
  
  <p>People who seem to have similar problems had solutions like setting</p>
  
  <pre><code>self.automaticallyAdjustsScrollViewInsets = NO;
  </code></pre>
  
  <p>or just hide the status bar</p>
  
  <pre><code>- (BOOL)prefersStatusBarHidden {
      return YES;
  }
  </code></pre>
  
  <p>However, both solutions don't work for me. The first one sets the contents too high and adds the 20px space at the bottom instead. The second one hides the status bar , but the offset still remains.</p>
  
  <p><img src="https://i.stack.imgur.com/syynI.png" alt="problem"></p>
  
  <p>Since I have a lot of the code from <a href="http://www.raywenderlich.com/10518" rel="nofollow noreferrer">this tutorial by Ray Wenderlich</a> and I have no idea where exactly in my code the problem lies, <a href="https://github.com/frederike/NZTravellerApp/blob/master/NZTravellerApp/CustomScrollViewController.m" rel="nofollow noreferrer">this is the link to code on github</a>.</p>
  
  <p>Can anyone help me?</p>