Assertion failure when using UISearchDisplayController in UITableViewController

后端 未结 7 2058
一个人的身影
一个人的身影 2020-12-07 12:55

I\'ve been trying to add simple Search functionality to a TableViewController in my app. I followed Ray Wenderlich\'s tutorial. I have a tableView with some data, I added th

7条回答
  •  感动是毒
    2020-12-07 13:51

    I am working on that tutorial also. The default TableViewController has "forIndexPath" and in his example it doesn't exist. Once I removed it the search works.

    //Default code
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
    
    //Replace with
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    

提交回复
热议问题