Swift 给UITableView 写extension 时 报错 does not conform to protocol 'UITableViewDataSource'
那是因为你没有实现 数据源和代理方法 实现下就好了
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return 0 } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { return UITableViewCell() }

浙公网安备 33010602011771号