私はUITableViewがある場合があります(必ずしもそうではありません)。テーブルHeaderView iPhone
コード(それは正常であるとした場合)
UIImageView *imgView = [[UIImageView alloc] initWithFrame:CGRectMake(0,0,98,100)];
imgView.image = [UIImage imageNamed:@"image.png"];
cell.imageView.image = imgView.image;
//sets cell text
cell.textLabel.text = @"Number";
を次のようにセルのようになりますが、私はindexPathを毎回変更するよりも、headerViewを実装するために容易になるだろうことをここで言われました。
私の質問はどのように実装するのですか? - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
を使用するか、- (NSString *)tableView:(UITableView *)aTableView titleForHeaderInSection:(NSInteger)section
を使用しますか?心に留めておくと、私はセルに配置するイメージを持っています(headerView)。
おかげ