【问题标题】:Is it acceptable to call super tableView: didSelectRowAtIndexPath: in a custom subclass?在自定义子类中调用 super tableView: didSelectRowAtIndexPath: 是否可以接受?
【发布时间】:2013-12-21 20:04:16
【问题描述】:

我有一个名为 SuperTableVC 的自定义 UITableviewViewController 类。我还有一个名为 SubTableVC 的 SuperTableVC 子类,我想在 tableView: didSelectRowAtIndexPath: 中再添加一个方法调用

我可以(应该)在 SubTableVC 中执行以下操作吗?

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {

   [super tableView:tableView didSelectRowAtIndexPath:indexPath];
   [self doSomethingExtra];    

}

【问题讨论】:

    标签: ios cocoa-touch uitableview


    【解决方案1】:

    当然。为什么不?这是基本的类继承逻辑。

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-02-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多