Skip to content
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
8 changes: 8 additions & 0 deletions SWTableViewCell/PodFiles/SWTableViewCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,14 @@ - (void)initializer
for (UIView *subview in cellSubviews)
{
[_contentCellView addSubview:subview];
if (subview.clipsToBounds) {
// iOS 8 layout bug
// clipsToBounds tells us it is a content cell view, hence we add 2 constraints for the top/left
[_contentCellView addConstraints:@[
[NSLayoutConstraint constraintWithItem:subview attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:_contentCellView attribute:NSLayoutAttributeTop multiplier:1.0 constant:0.0],
[NSLayoutConstraint constraintWithItem:subview attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:_contentCellView attribute:NSLayoutAttributeLeft multiplier:1.0 constant:0.0],
]];
}
}

// Set scroll view to perpetually have same frame as self. Specifying relative to superview doesn't work, since the latter UITableViewCellScrollView has different behaviour.
Expand Down