It seems that if we configure a data source (usually
TWTRSearchTimelineDataSource), and display it with the standard TwitterKit
TWTRTimelineViewController, that if the data source doesn’t retrieve any content, the controller simply displays an empty table. This is not a great user experience.
It would be great if at least one of the following were true:
- The stock timeline controller handled the case where loading content does not succeed, and displayed a message to the user.
- The timeline controller had some kind of delegate object that it notified whenever it finished attempting to load content, after the table view state is updated. Ideally, this would include error details in the case where the load failed. But at least something we could use to check whether the table was empty or not, and manage a substitute UI.
- There existed some way to listen to / interact with the data source object after it’s been configured at handed off to the timeline controller. There’s a callback block it calls when a request to load content succeeds, but no mechanism for propagating that information anywhere but the object that initiated the load (which, in this case, is opaque).
(For the record: in our specific case, the particular content to be displayed is controlled by our users, so we can’t prevent this by hand-selecting popular hashtags, or whatever.)