UISearchDisplayController—why does my search result view contain empty cells?

后端 未结 1 1397
半阙折子戏
半阙折子戏 2021-02-09 14:40

I am about to go out of my mind here, in my Core Data databse I have a lot of users, i have hooked the database up to a tableviewcontroller via NSFetchedResultController, and wh

1条回答
  •  不思量自难忘°
    2021-02-09 15:19

    The issue was that when i got the cell in cellforrowatindexpath, it didn't get it from the original viewcontrollers tableview, so i changed the line from

    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; 
    

    to

    UITableViewCell *cell = [self.tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    

    and now all is good, the cell has the layout from storyboard and segues works like a charm..

    0 讨论(0)
提交回复
热议问题