If you want add and UIView before a table section, this view will be before the tableView also. And At least you do by code this view won't be scrolled.
You must change you TabelViewController to a ViewController and adding the tableView Protocols delegate. And no sure but you must have something like that:
@interface TestTableViewController : UITableViewController
And you should be:
@interface TestTableViewController : UIViewController <UITableViewDataSource,UITableViewDelegate>
Then: In Storyboard add the View and the tableview (Both should have in the same level). Add constrains, connect delegates, and create a IBOutlet for both:
@property (nonatomic,strong) IBOutlet UIView *superHeader;
@property (nonatomic, strong) IBOutlet UITableView *tableView;
With this two outlet if you want you can code to the superHeader disappear when you scrolling until a point, here an example (Remember tableView is a scrollView son).
-(void)scrollViewDidScroll:(UIScrollView *)scrollView
{
if (scrollView.contentOffset.y > 100)
{
[UIView animateWithDuration:0.3 animations:^{
// Be carfuly if you are navigationBar (64 ptos) and depens of transparency property
self.tableView.frame = CGRectMake(0, -50, self.view.bounds.size.width, 50);
self.tableView.frame = CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height);
}];
} else if(scrollView.contentOffset.y < 80) {
[UIView animateWithDuration:0.3 animations:^{
// Be carfuly if you are navigationBar (64 ptos) and depens of transparency property
self.tableView.frame = CGRectMake(0, 0, self.view.bounds.size.width, 50);
self.tableView.frame = CGRectMake(0, 50, self.view.bounds.size.width, self.view.bounds.size.height - 50);
}];
}
}