title: hiding the navigation bar like instagram or Facebook in iPhone?
body: <p>I had an application in which I want to hide my navigation bar when scrolling upwards in a <code>UITableView</code>. I am doing like this </p>
  
  <pre><code>- (void)scrollViewDidScroll:(UIScrollView *)sender {
  
      //Initializing the views and the new frame sizes.
      UINavigationBar *navbar = self.navigationController.navigationBar;
      UIView *tableView = self.view;
  
      CGRect navBarFrame = self.navigationController.navigationBar.frame;
      CGRect tableFrame = self.view.frame;
  
      //changing the origin.y based on the current scroll view.
      //Adding +20 for the Status Bar since the offset is tied into that.
      navBarFrame.origin.y = MIN(0, (sender.contentOffset.y * -1)) +20;
      navbar.frame = navBarFrame;
  
      tableFrame.origin.y = MIN(0,MAX(-44,(sender.contentOffset.y * -1)));
      tableView.frame = tableFrame;    
  }
  </code></pre>
  
  <p>But the problem is that it is moving completely upwards in iOS 7. I need it to be stopped under the status bar and the status bar is shown there.</p>