Greg
Greg

Reputation: 34818

how do you overload the UITableView "reloadData" method in a UITableViewController?

how do you overload the UITableView "reloadData" method in a UITableViewController?

e.g. to put a log statement to see/confirm when reloadData is being called on each of my UITableViews

Upvotes: 3

Views: 5738

Answers (1)

Andreas
Andreas

Reputation: 2450

Just subclass the UITableView and override reloadData function:

Header

@interface MyUITableView : UITableView

Function

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

To use it you make instantiate MyUITableView instead of UITableView

Upvotes: 8

Related Questions