dzenbot / DZNEmptyDataSet

A drop-in UITableView/UICollectionView superclass category for showing empty datasets whenever the view has no content to display
https://www.cocoacontrols.com/controls/dznemptydataset
MIT License
12.09k stars 1.73k forks source link

Wrong offset of empty data view position. #468

Open ElvistLui opened 3 years ago

ElvistLui commented 3 years ago

STEP: 1.Load two pages of data; 2.Swipe half the screen; 3.Clear the data, then[tableView reloadData];.

RESULT: DZNEmptyDataSetView should be on top, but the position here is wrong. image

I suggest moving the [self dzn_reloadEmptyDataSet]; method in the figure to the last call. image

norman93sun commented 3 years ago

i have the same issue! Try with: pod 'DZNEmptyDataSet', :git => "https://github.com/norman93sun/DZNEmptyDataSet.git"

norman93sun commented 3 years ago

I found the code is not right from pod. @dzenbot Since I add DZNEmptyDataSet from podfile,the func didMoveToSuperview is not the same with source code

截屏2021-01-12 下午1 52 46
pennelia16 commented 3 years ago

I had the same issue, but Norman's code wasn't meshing well in my project. I ended up changing to the Swift version instead and it worked. https://github.com/Xiaoye220/EmptyDataSet-Swift