Skip to content

Commit

Permalink
Fixed: Footer view is placed offscreen only when content size is less…
Browse files Browse the repository at this point in the history
…er than the screen itself.
  • Loading branch information
cocoabits committed Jan 11, 2011
1 parent 6faa470 commit a337fa9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Classes/AQGridView.m
Original file line number Diff line number Diff line change
Expand Up @@ -487,8 +487,13 @@ - (void) setContentSize: (CGSize) newSize
if ( (_flags.contentSizeFillsBounds == 1) && (newSize.height < self.bounds.size.height) )
newSize.height = self.bounds.size.height;

if (self.gridFooterView)
newSize.height += CGRectGetHeight(self.gridFooterView.bounds);
if (self.gridFooterView)
{
CGFloat footerHeight = CGRectGetHeight(self.gridFooterView.bounds);
CGFloat minimumHeight = CGRectGetHeight(self.bounds) + footerHeight;
if (newSize.height < footerHeight + minimumHeight)
newSize.height = minimumHeight;
}

CGSize oldSize = self.contentSize;
[super setContentSize: newSize];
Expand Down

0 comments on commit a337fa9

Please sign in to comment.