Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在 UITableViewController 中重载 UITableView“reloadData”方法?
例如,在我的每个 UITableView 上调用 reloadData 时放置一个日志语句以查看/确认
只需子类化 UITableView 并覆盖 reloadData 函数:
标题
@interface MyUITableView : UITableView
功能
- (void)reloadData { [super reloadData]; NSLog("Hello"); }
要使用它,您需要实例化MyUITableView而不是UITableView
MyUITableView
UITableView