I'm reflecting on what is the recommended way to display a notification that there is no data for a particular section in the ViewView / TableView collection.
One way is to create a special cell and place it instead of data cells. This seems strange, because the "empty notification" cell does not correlate with the data, which means that I will need to propagate a lot of conditions in didSelectItem, setting up the cell, etc.
Using https://github.com/dzenbot/DZNEmptyDataSet only works when the whole view is empty, and not in a specific section
Another way would be (what I'm doing now) to insert a UIView in the place where the data will be as a collection subview, but it will also require maintenance when reloading the data, scrolling, clicking. In addition, this requires calculating the placement of the view, which means that I need to change it for the collection, since it is not part of the viewviewlayout collection
Is there a recommended pattern to deal with these situations?
source
share