From 5f62ca5658c46f3b0e22ad62c6758118d9069f82 Mon Sep 17 00:00:00 2001 From: zhaolinbo Date: Fri, 21 Jul 2017 16:07:18 +0800 Subject: [PATCH] fix customer empty view not show bug --- Source/UIScrollView+EmptyDataSet.m | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/UIScrollView+EmptyDataSet.m b/Source/UIScrollView+EmptyDataSet.m index 27d0a3a7..5e09a529 100644 --- a/Source/UIScrollView+EmptyDataSet.m +++ b/Source/UIScrollView+EmptyDataSet.m @@ -934,6 +934,7 @@ - (void)setupConstraints // If applicable, set the custom view's constraints if (_customView) { + [self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[contentView]|" options:0 metrics:nil views:@{@"contentView": self.contentView}]]; [self.contentView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[customView]|" options:0 metrics:nil views:@{@"customView":_customView}]]; [self.contentView addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[customView]|" options:0 metrics:nil views:@{@"customView":_customView}]]; }