0

私は2つの異なるタイプの細胞を持っています。メソッドでそれぞれに異なるサイズを割り当てる必要があります。

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath

細胞の種類はどのように判断できますか? たぶん、reuseIdentifier などを取得します。

更新 これを試してみると

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    NSLog(@"%@", [self.tableView cellForRowAtIndexPath:indexPath]);
}

私は例外を受け取ります ここに画像の説明を入力

4

1 に答える 1