私には習慣がありますUITableViewCell
。セルのプロパティ、つまりaなどにアクセスしたいのですがUILabel
、次のコードを挿入してみました:
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
CategorieCell *customCell = (CategorieCell *)[tableView cellForRowAtIndexPath:indexPath];
return ...
}
アプリを実行すると、エラーの詳細が表示されずにクラッシュしました。問題は、私が作成している新しい customCell にあります。customCell.m
オブジェクトにアクセスできる別の方法はありますか?