Table View cellForRowAtIndexPath warning

后端 未结 3 557
长发绾君心
长发绾君心 2021-01-11 11:44

I have updated my code to swift 3.0 and get a warning on the following line:

func tableView(_ tableView: UITableView, cellForRowAtIndexPath indexPath: IndexP         


        
3条回答
  •  没有蜡笔的小新
    2021-01-11 11:55

    Just add the declaration of implementing UITableViewDataSource protocol to the class definition like this:

    class ViewController: UIViewController, UITableViewDelegate, UITableViewDataSource {}
    

提交回复
热议问题