当从 UISearchBar 中找不到任何结果时,我想模仿 Mail 应用程序的行为,并显示一个带有调用方法的链接的单元格。我无法弄清楚(或在任何地方找到)如何做到这一点。
我认为我最接近的是以下(我已添加到我的代码中)
if ([self.keys count] == 0){
[self.tableView beginUpdates];
[self.tableView insertRowsAtIndexPaths:[NSArray arrayWithObject:newIndexPath] withRowAnimation:UITableViewRowAnimationBottom];
[self.tableView endUpdates];
}
[tableView reloadData];