I'm trying to display a no results message on my tableview when it is empty. I have done the uilabel approach where it appears when it is empty but it seems like it's not how Apple has done it in the Contacts etc where the "No Results" move as well when you try to scroll up and down. Mine just stays there in one spot.
Does anyone know how to do this?
I think they added a No Results cell?
Yes. If you have no results to display, do the following
noResultsToDisplay = YES
, set it to NO
otherwise.if (noResultsToDisplay) return 3;
if (noResultsToDisplay && indexPath.row == 2) cell.textLabel.text = @"No Results";
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With