DZNEmptyDataSet
DZNEmptyDataSet copied to clipboard
use customView, DZN-_contentView's frame = (0,0,0,0)
use customView, DZN-_contentView's frame = (0,0,0,0)
@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; }
@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!