Throw an exception when trying to set a null minimum item size for a collection view.

This commit is contained in:
Alexander Ljungberg
2012-02-17 16:25:16 +00:00
parent 3a8ad56d4b
commit 4b764dc8b4
+3 -1
View File
@@ -475,7 +475,7 @@
}
var superview = [self superview],
proposedHeight = y + itemSize.height + _verticalMargin;
proposedHeight = y + itemSize.height + _verticalMargin;
if ([superview isKindOfClass:[CPClipView class]])
{
@@ -561,6 +561,8 @@
*/
- (void)setMinItemSize:(CGSize)aSize
{
if (aSize === nil || aSize === undefined)
[CPException raise:CPInvalidArgumentException reason:"Invalid value provided for minimum size"];
if (CGSizeEqualToSize(_minItemSize, aSize))
return;