即时通讯设置我的部分标题在uitableview中的问题,它可能是一个非常简单的东西,我只是不能解决它。在UITableView部分标题的问题
,而不是为不同部分显示不同的页眉它显示了每个部分
帮助相同的标题我请:)
- (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;
}
您是否检查过appDelegate.matchFixtures count是否有通过NSLog打印的值?相同的fixtures.matchDate? – 2010-04-29 13:16:22
每个matchFixture都有不同的matchDate吗? – DyingCactus 2010-04-29 13:24:42