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 的视图控制器。当我将此 VC 推送到导航堆栈时,会调用 UITableView 委托方法,然后调用 viewDidLoad,然后再次调用委托方法。这里发生了什么?
因为您的视图是 UITableViewController 的子类,所以委托和数据源从它创建的第一刻起就被附加,并且在分配数据源后立即调用方法。
此外,您可以在其上设置断点并查看哪个类称为数据源。