I have one UIViewwith a grouped one UITableView, and I would like it to UIViewstay still tableHeaderView, and not move when scrolling UITableViewCell. Therefore, I would like the cells to be behind UIViewwhen scrolling.
This is the code I'm using now to add mine UIViewto mine UIViewController:
Interface.h:
@interface MyAccountVC : UIViewController <UITableViewDelegate, UITableViewDataSource> {
    HeaderView *myHeaderView; 
    UITableView *tv;
}
@property (nonatomic, retain) IBOutlet UITableView *tv;
@property (nonatomic, retain) HeaderView myHeaderView;
Implementation of .m (in viewDidLoad):
NSArray *topLevelObjects = [[NSBundle mainBundle] loadNibNamed:@"HeaderView" owner:nil options:nil];
for (id currentObject in topLevelObjects) {
    if ([currentObject isKindOfClass:[UIView class]]) {
        self.myHeaderView = (HeaderView *)currentObject;
        break;
    }
}
CGRect newFrame = CGRectMake(0.0, 0.0, self.tv.bounds.size.width, self.myHeaderView.frame.size.height);
self.myHeaderView.frame = newFrame;
self.tv.tableHeaderView = self.myHeaderView;
Not sure if this is the best way to add myHeaderViewin UITableView, but it seems to work fine, and I can just add the above code to anyone UIViewControllerwith UITableViewuse a header if necessary.
, , UINavigationBar, . , , , , .