你如何在UITableViewController中重载UITableView“reloadData”方法?

时间:2011-10-18 06:01:44

标签: iphone ios uitableview reloaddata

如何在UITableViewController中重载UITableView“reloadData”方法?

e.g。在我的每个UITableViews

上调用reloadData时放置一个日志语句来查看/确认

1 个答案:

答案 0 :(得分:7)

只需继承UITableView并覆盖reloadData函数:

标题

@interface MyUITableView : UITableView

<强>功能

- (void)reloadData {
    [super reloadData];
    NSLog("Hello");
}

要使用它,您可以实例化MyUITableView而不是UITableView