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;