在我的应用程序中,我使用了自定义标题视图。在视图中有三个标签。当我加载表时,它没有正确显示标题视图。
任何人都可以为我解决这个问题吗?
编辑:
for (int i = 0; i < appDelegate.arySongs.count; i++) {
id data = [[appDelegate.arySongs objectAtIndex:i] valueForKey:@"media"];
if([data isKindOfClass:[MPMediaItem class]]){
[self.aryHeaders addObject:[self createCombineHeader:i isMediaItem:YES]];
}
}
[tblview reloadData];
-(HeaderView*)createCombineHeader:(int)headerNumber isMediaItem:(BOOL)isMediaItem
{
NSLog(@"creating header number %d",headerNumber);
NSMutableDictionary *dictData = [[NSMutableDictionary alloc]init];
dictData = [appDelegate.arySongs objectAtIndex:headerNumber] ;
HeaderView *headerView = [[HeaderView alloc]init];
//CellHeader *headerView = [[CellHeader alloc]initWithNibName:@"CellHeader
[headerView.view setFrame:CGRectMake(0, 0, 320, 44)];
[headerView.view setBackgroundColor:[UIColor whiteColor]];
[headerView.view setTag:headerNumber];
return headerView;
}