0

I have the following code:

- (BOOL)searchBarShouldBeginEditing:(UISearchBar *)searchBar
{
    float searchBarBottom = self.searchController.searchBar.frame.size.height;
    // searchBarBottom = 200.0;
    CGPoint offset = CGPointMake(0, searchBarBottom);
    self.tableView.contentOffset = offset;

    return YES;
}

I hit the search bar which appears above my table view and the search bar controller shows the search bar with a cancel button on the top line and my scope bar below. I want the table view to slide down below the scope bar but above isn't working. How does this get fixed?

cdub
  • 24,555
  • 57
  • 174
  • 303
  • Apparently in ios 9 you need to call [self.tableView beginUpdates] - see: http://stackoverflow.com/a/20383030/665557 – cdub Nov 20 '15 at 07:43
  • It's `[self.refreshControl beginRefreshing]`. If you call `beginUpdates` you will also need to call `endUpdates` after you finished – zc246 Nov 20 '15 at 09:28
  • what is the refresh control? i just want my table view to move down when the scope bar gets added in – cdub Nov 20 '15 at 09:54
  • I'm just saying that you are pointing the wrong link – zc246 Nov 20 '15 at 10:02

0 Answers0