那是因为你没有实现 数据源和代理方法 实现下就好了
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return 0 } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { return UITableViewCell() }
那是因为你没有实现 数据源和代理方法 实现下就好了
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return 0 } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { return UITableViewCell() }
转载于:https://www.cnblogs.com/ZhangShengjie/p/6806451.html