Hey there,
I have a UITableViewController subclass to which I add a SCTableViewModel.
Then I add a UISearchBar to the tableHeaderView of the table model's modeled table view:
UISearchBar *searchBar = [[UISearchBar alloc] initWithFrame:CGRectMake(0, 0, 320, 44)];
self.tableModel.modeledTableView.tableHeaderView = searchBar;
To hide the search bar by default I set a content offset in
viewWillAppear:
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
self.tableModel.modeledTableView.contentOffset = CGPointMake(0,44);
}
This works fine.
But when I tap on a cell to show the detail view table and pop this view (= go back to the root table view) the search bar appears. I guess that's because the tableview is being reloaded by STV.
Is there any chance to set this content offset again after the table has been reloaded. (In case I'm right with my reloading theory.) Maybe a delegate?
Thanks,
Patrick