the first is the table title, the second will give you opportunism to add a title to each section of the table.
Green is tableViewHeader and blue is sectionHeaders.

-(void) viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; if (headerView == nil) { [[NSBundle mainBundle] loadNibNamed:@"DetailContactHeader" owner:self options:nil]; headerView.nameLabel.text = [NSString stringWithFormat:@"%@ %@", [contact objectForKey:@"name"], [contact objectForKey:@"familyname"]]; if ([[contact allKeys] containsObject:@"pictureurl"]) { headerView.avatarView.image = [UIImage imageNamed:[contact objectForKey:@"pictureurl"]]; } } [self.tableView setTableHeaderView: headerView]; } - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 2; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
Here you will find the code for this application: MyContacts
vikingosegundo
source share