trouble with section headers in UITableView
- by richard Stephenson
hi guys , im having a problem with setting my section headers in a uitableview, its probably something really simple i just cant work it out.
instead of displaying different headers for different sections it displays the same header for each section
help me please :)
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
WorldCupAppDelegate *appDelegate = [UIApplication sharedApplication].delegate;
return [appDelegate.matchFixtures count];
}
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section {
WorldCupAppDelegate *appDelegate = [UIApplication sharedApplication].delegate;
Fixtures *fixtures = [appDelegate.matchFixtures objectAtIndex:section];
return fixtures.matchDate;
}