I am using a UITableView to display some data which the user can filter. If a certain (perfectly "legal") combination is selected, all data is filtered out (hidden). I would like to display some text stating that no results were found and to please modify your filters.
Does anything trigger when this occurs that I can hook in to?
Or will I have to manually check for an empty data set and create a custom view to display my text? (I was thinking of creating a blank cell and using that footer? Hoping for something more elegant...)
I found a similar question, but the solution is not what I am looking for: Handling empty UITableView in UITableViewController
Also, I have an Android programming background and use this exact feature frequently, I would be surprised if Apple didn't do this as well!
Put a custom view with your error text message behind the table. Then when there is no data to be displayed set table.alpha=0.0 (or table.hidden=YES), while when you have this data available set table.alpha=1.0 (or table.hidden=NO). You can do the control on the "OK" button (or equivalent) of the filter.
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