Merge branch 'fix-cptabview-height-resizing' of https://github.com/primalmotion/cappuccino into primalmotion-fix-cptabview-height-resizing

This commit is contained in:
Alexander Ljungberg
2010-11-05 11:56:19 -03:00
2 changed files with 16 additions and 1 deletions
+1 -1
View File
@@ -74,7 +74,7 @@ var HEIGHT_OF_SEGMENTED_CONTROL = 24;
[self addSubview:box];
[self addSubview:tabs];
[box setAutoresizingMask:CPViewWidthSizable];
[box setAutoresizingMask:CPViewWidthSizable | CPViewHeightSizable];
[tabs setAutoresizingMask:CPViewMinXMargin | CPViewMaxXMargin];
}
return self;
+15
View File
@@ -10,6 +10,11 @@
return tabs;
}
- (CPBox)box
{
return box;
}
@end
@@ -62,4 +67,14 @@
[self assert:([tabs boundsSize].width / 2) equals:CPRectGetMidX([tabs bounds])];
}
- (void)testBoxHeight
{
var box = [_tabView box],
tabs = [_tabView tabs];
[_tabView setFrame:CPRectMake(0, 0, 800, 800)];
[self assert:[box frameSize].height equals:800 - ([box frameOrigin].y) - [tabs frameSize].height / 2];
}
@end