Collection view should tile itself to be the height of its superview if inside a clip view.

This commit is contained in:
Ross Boucher
2010-04-24 11:10:58 -07:00
parent 5f6f997095
commit 6d595c1344
+10 -1
View File
@@ -426,8 +426,17 @@
x += itemSize.width + _horizontalMargin;
}
var superview = [self superview],
proposedHeight = y + itemSize.height + _verticalMargin;
if ([superview isKindOfClass:[CPClipView class]])
{
var superviewSize = [superview bounds].size;
proposedHeight = MAX(superviewSize.height, proposedHeight);
}
_tileWidth = width;
[self setFrameSize:CGSizeMake(width, y + itemSize.height + _verticalMargin)];
[self setFrameSize:CGSizeMake(width, proposedHeight)];
_tileWidth = -1.0;
}