如何通过CustomCell中的自定义单元格获取tableView?如何通过自定义单元格获取tableView?
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
CustomCell *cell = [tableView dequeueReusableCellWithIdentifier:@"CustomCell" forIndexPath:indexPath];
return cell;
}
@implementation CustomCell
- (void)awakeFromNib {
[super awakeFromNib];
// How do I get tableView by custom cell in the CustomCell?
}
@end
没有理由让单元访问它所在的表。请解释为什么你认为你需要这个。可能有更好的解决方案。 – rmaddy
有详细页面,使用不同的单元格。有两个视图的标签视图,我通常在其中添加两个控制器。所以我必须让超级视图控制器添加子控制器。我不知道我的描述,我的英文不好: - ) –