From 6a83f9827532f0ae69fb9fd02bc63cd6104eae8a Mon Sep 17 00:00:00 2001 From: KFJ <392843367@qq.com> Date: Wed, 14 Mar 2018 09:38:52 +0800 Subject: [PATCH] fix bug line of 928,add vertical constraints to fix the bug of the customeview could not show. --- Source/UIScrollView+EmptyDataSet.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/UIScrollView+EmptyDataSet.m b/Source/UIScrollView+EmptyDataSet.m index 27d0a3a7..6de39677 100644 --- a/Source/UIScrollView+EmptyDataSet.m +++ b/Source/UIScrollView+EmptyDataSet.m @@ -926,7 +926,8 @@ - (void)setupConstraints [self addConstraint:centerXConstraint]; [self addConstraint:centerYConstraint]; [self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[contentView]|" options:0 metrics:nil views:@{@"contentView": self.contentView}]]; - + [self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[contentView]|" options:0 metrics:nil views:@{@"contentView": self.contentView}]]; + // When a custom offset is available, we adjust the vertical constraints' constants if (self.verticalOffset != 0 && self.constraints.count > 0) { centerYConstraint.constant = self.verticalOffset;