Skip to content

Commit

Permalink
Merge commit 'a337fa' into footer-fixes
Browse files Browse the repository at this point in the history
* commit 'a337fa':
  Fixed: Footer view is placed offscreen only when content size is lesser than the screen itself.
  Fixed: Footer view is shifted offscreen.

Conflicts:
	Classes/AQGridView.m
  • Loading branch information
AlanQuatermain committed Jan 13, 2011
2 parents 71817f2 + a337fa9 commit b11ca04
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Classes/AQGridView.m
Expand Up @@ -507,6 +507,14 @@ - (void) setContentSize: (CGSize) newSize
if ( (_flags.contentSizeFillsBounds == 1) && (newSize.height < self.bounds.size.height) )
newSize.height = self.bounds.size.height;

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 b11ca04

Please sign in to comment.