通常、選択したセルを次のように取得します。
- (void)tableView:(UITableView *)table didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
CustomCell *cell = (CustomCell*) [table cellForRowAtIndexPath:indexPath];
}
しかし、私が使用しているコードでは、テーブル ビューに多くの種類のセルが含まれている可能性があります。選択したセルのクラスを取得するにはどうすればよいですか (たとえばCustomCell
、 またはの場合CustomCell2
) ?