I got an empty UICollectionView, which means the number of cells in it is 0.
I intended to do this, so when there is no data available, numberOfItemsInSection will return 0. Then the user can select Pull to refresh if there is no data. (content size is less than the height of the screen, excluding the types of arrows PullToRefresh)
My problem is that there is at least one cell, pull to refresh work perfectly,
but when there are no cells, I can not pull to refresh. I'm not sure how to do this, or if the number of cells affects pullToRefresh?
My code is pretty simple:
[collectionView addPullToRefreshWithActionHandler:^{ [weakSelf reloadDashboardData]
source share