How to disable header scroll of UITableView?

I created a UITableView programmatically, and now I want to add a fixed header to it. As I below, the header code also scrolls through my tableview.

UILabel *label = [[[UILabel alloc] initWithFrame:CGRectMake(0, 0, 320, 28)] autorelease]; label.backgroundColor = [UIColor darkGrayColor]; label.font = [UIFont boldSystemFontOfSize:15]; label.shadowColor = [UIColor colorWithWhite:0.0 alpha:0.8]; label.textAlignment = UITextAlignmentLeft; label.textColor = [UIColor whiteColor]; label.text = @"my header"; myTable.tableHeaderView = label; 

Is there a function that disables header scrolling?

thanks

+6
header uitableview scroll ios4
source share
1 answer

No, you need to either change the view as the section title (where it will be at the top of the table until this section is visible), or you need the title to display the sibling in the table view in the viewview viewview - you can create a UIView just to to hold the title view and table view.

+6
source share

All Articles