Skip to content
This repository was archived by the owner on Nov 29, 2022. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Source/UIScrollView+EmptyDataSet.m
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,7 @@ - (instancetype)init
- (void)didMoveToSuperview
{
self.frame = self.superview.bounds;
[self.superview bringSubviewToFront:self];

void(^fadeInBlock)(void) = ^{_contentView.alpha = 1.0;};

Expand Down Expand Up @@ -921,9 +922,11 @@ - (void)setupConstraints
// The content view must alway be centered to its superview
NSLayoutConstraint *centerXConstraint = [self equallyRelatedConstraintWithView:self.contentView attribute:NSLayoutAttributeCenterX];
NSLayoutConstraint *centerYConstraint = [self equallyRelatedConstraintWithView:self.contentView attribute:NSLayoutAttributeCenterY];
NSLayoutConstraint *heightConstraint = [self equallyRelatedConstraintWithView:self.contentView attribute:NSLayoutAttributeHeight];

[self addConstraint:centerXConstraint];
[self addConstraint:centerYConstraint];
[self addConstraint:heightConstraint];
[self addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[contentView]|" options:0 metrics:nil views:@{@"contentView": self.contentView}]];

// When a custom offset is available, we adjust the vertical constraints' constants
Expand Down