title: iOS UITableView content offset not working in iOS7
body: <p>In my app I have a search bar in the header of my<code>UITableView</code>. I tried to set the content offset to my <code>UITableView</code> for hiding the search bar but it is giving me some problems.</p>
  
  <p>Finally I solved like this:</p>
  
  <pre><code>- (void)viewWillAppear:(BOOL)animated
  {
      [self performSelector:@selector(hideSearchBar) withObject:nil afterDelay:0.0f];
  }
  
  - (void)hideSearchBar 
  {
      self.tblView.contentOffset = CGPointMake(0, 40);
  }
  </code></pre>
  
  <p>The problem is it only works for iOS 8. </p>
  
  <p>How can I achieve this correctly to work for both iOS 7 &amp; 8 ????</p>
  
  <p>Sorry for my poor english. Thanks in advance.</p>