Skip to content
This repository was archived by the owner on Jan 17, 2019. It is now read-only.

Commit 5f94dd5

Browse files
authored
Merge pull request #261 from spotify/fix-cuasing-unsatisfiable-constraints
Fix Hub Framework causing unsatisfiable constraints
2 parents 99f8c31 + c6afc5b commit 5f94dd5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

sources/HUBComponentCollectionViewCell.m

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,11 @@ - (void)setComponent:(nullable id<HUBComponent>)component
5757
}
5858

5959
id<HUBComponent> const nonNilComponent = component;
60-
[self.contentView addSubview:HUBComponentLoadViewIfNeeded(nonNilComponent)];
60+
61+
UIView * const componentView = HUBComponentLoadViewIfNeeded(nonNilComponent);
62+
componentView.autoresizingMask |= UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
63+
64+
[self.contentView addSubview:componentView];
6165
}
6266

6367
#pragma mark - UICollectionViewCell

0 commit comments

Comments
 (0)