class HomeViewController: UIViewController, UITableViewDelegate, UITableViewDataSource
{
code
}
在使用TableViewController时,我删除了这两个类/接口(interface)UITableViewDataSource、 UITableViewDelegate。仍然工作正常。 为什么?
class HomeViewController: UIViewController
{
code
}
那么我们为什么要使用这些类呢?
最佳答案
它仍然有效,因为 UITableViewController
已经实现了委托(delegate) UITableViewDelegate
和 UITableViewDataSource
:)
关于swift - UI 表格 View Controller ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33711389/