I have a tableview controller and I was trying load a nib for its headerview in the viewdidload. The code is like:
(void)viewDidLoad
{
[super viewDidLoad];
self.navigationItem.rightBarButtonItem = self.editButtonItem;
// Create and set the table header view.
if (tableHeaderView == nil) {
[[NSBundle mainBundle] loadNibNamed:@"RZWordDetailHeaderView" owner:self options:nil];
[tableHeaderView setContentMode:UIViewContentModeScaleAspectFill];
self.tableView.tableHeaderView = tableHeaderView;
self.tableView.allowsSelectionDuringEditing = YES;
}
}
When I run the program, the screen turned out like this image.
It seems that some part of the nib is behind the navigation bar and all the other buttons on the nib view are moved downwards.
Does anyone know how to solve this? Thank you very much.