Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partial support for UITableViewHeaderFooterView #37

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
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
5 changes: 2 additions & 3 deletions RZCellSizeManager/RZCellSizeManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@ @implementation UIView (AutoLayout)
// Note that there may be performance issues with this in some cases. Should only call in on Awake from nib or initialization and not on reuse.
- (void)moveConstraintsToContentView
{
if ([self isKindOfClass:[UICollectionViewCell class]] || [self isKindOfClass:[UITableViewCell class]])
{
if ( [self isKindOfClass:[UICollectionViewCell class]] || [self isKindOfClass:[UITableViewCell class]] || [self isKindOfClass:[UITableViewHeaderFooterView class]] ) {
for(NSLayoutConstraint *cellConstraint in self.constraints){
[self removeConstraint:cellConstraint];
id firstItem = cellConstraint.firstItem == self ? self.contentView : cellConstraint.firstItem;
Expand All @@ -119,7 +118,7 @@ - (void)moveConstraintsToContentView

- (UIView *)contentView
{
// We know we are a collectionview cell or a tableview cell so this is safe.
// We know we are a UICollectionViewCell, UITableViewCell, or UITableViewHeaderFooterView, so this is safe.
return [(UITableViewCell *)self contentView];
}

Expand Down