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.
我有一个包含 TableView 的常规 ViewController。我正在使用情节提要来布置所有内容,但没有调用任何 TableView 委托函数。我需要做些什么来将 ViewController 设置为 TableView 的委托。
您需要为表视图设置数据源和委托。转到情节提要并 ctrl+单击表视图并将其拖动到将控制表视图的视图控制器。将显示一个弹出窗口,您可以选择它作为数据源和委托。