'UITableView' failed to obtain a cell from its dataSource

前端 未结 3 522
旧时难觅i
旧时难觅i 2021-01-23 20:10

I updated Xcode and since then I\'v problems with my dataBase. code:

override func numberOfSections(in tableView: UITableView) -> Int {
    // return the numb         


        
3条回答
  •  轮回少年
    2021-01-23 20:32

    In order to get a cell for your table view you must implement the data source method that is designed to provide the table view with a cell for a given row at an index path. This method is:

    tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath)
    

    Because this method is a required method you can not leave it out or you will get an error. Configure your cell in this method.

提交回复
热议问题