DZNEmptyDataSet icon indicating copy to clipboard operation
DZNEmptyDataSet copied to clipboard

use customView, DZN-_contentView's frame = (0,0,0,0)

Open stackJolin opened this issue 6 years ago • 2 comments

use customView, DZN-_contentView's frame = (0,0,0,0)

stackJolin avatar Aug 08 '18 03:08 stackJolin

@stackJolin this DZN use auto layout so you set the frame did not work ,you can use masonry or others to layout ,give you a example

  • (nullable UIView *)customViewForEmptyDataSet:(UIScrollView *)scrollView; { UIView *testVIe =[UIView MAGetUIViewWithBackgroundColor:[UIColor redColor] superView:scrollView masonrySet:^(UIView *currentView, MASConstraintMaker *make) { make.width.mas_equalTo(300); make.height.mas_equalTo(100);

    }]; return testVIe; }

chance395 avatar Feb 01 '19 08:02 chance395

@stackJolin this DZN use auto layout so you set the frame did not work ,you can use masonry or others to layout ,give you a example

  • (nullable UIView *)customViewForEmptyDataSet:(UIScrollView *)scrollView; { UIView *testVIe =[UIView MAGetUIViewWithBackgroundColor:[UIColor redColor] superView:scrollView masonrySet:^(UIView *currentView, MASConstraintMaker *make) { make.width.mas_equalTo(300); make.height.mas_equalTo(100); }]; return testVIe; }

It works for me, thanks!

TimLin320 avatar May 14 '19 08:05 TimLin320