如果我的 tableView 没有可显示的内容,我需要提醒用户有 0 个结果。我在 willDisplayCell 方法中执行此操作,但如果有 0 个结果,它不会注册。有谁知道如何修改这个?谢谢!
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell 
forRowAtIndexPath:(NSIndexPath *)indexPath {
if([indexPath row] == ((NSIndexPath*)[[tableView indexPathsForVisibleRows] 
lastObject]).row) {
    if ([self.listItems count] == 0) {
        UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"No Results" message:@"No 
        results found" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil, nil];
        [alert show];
    }
}
}