Created
September 14, 2009 18:52
-
-
Save boucher/186840 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/src/main/webapp/app/TwitView.j b/src/main/webapp/app/TwitView.j | |
| index 40c2095..185177f 100644 | |
| --- a/src/main/webapp/app/TwitView.j | |
| +++ b/src/main/webapp/app/TwitView.j | |
| @@ -13,13 +13,14 @@ | |
| _label = [[CPTextField alloc] initWithFrame:CGRectMakeZero()]; | |
| [_label setFont:[CPFont systemFontOfSize:12]]; | |
| [_label setTextColor:[CPColor whiteColor]]; | |
| - [_label setAutoresizingMask:CPViewWidthSizable]; | |
| + [_label setAutoresizingMask:CPViewWidthSizable|CPViewHeightSizable]; | |
| + [_label setFrame:[self bounds]]; | |
| [self addSubview:_label]; | |
| + | |
| } | |
| [_label setStringValue:obj.text]; | |
| - [_label setFrameSize:CGSizeMake(200, 60)]; | |
| [_label setLineBreakMode:CPLineBreakByWordWrapping]; | |
| } | |
| diff --git a/src/main/webapp/app/TwitterController.j b/src/main/webapp/app/TwitterController.j | |
| index 6649448..e3c65b8 100644 | |
| --- a/src/main/webapp/app/TwitterController.j | |
| +++ b/src/main/webapp/app/TwitterController.j | |
| @@ -49,7 +49,7 @@ | |
| [itemPrototype setView:[[TwitView alloc] initWithFrame:CGRectMakeZero()]]; | |
| _timelineView = [[CPCollectionView alloc] initWithFrame:CGRectMake(0, 0, | |
| - CGRectGetWidth(scrollViewBounds), 60)]; | |
| + CGRectGetWidth(scrollViewBounds), 0)]; | |
| [_timelineView setItemPrototype:itemPrototype]; | |
| [_timelineView setDelegate:self]; | |
| [_timelineView setMaxNumberOfColumns:1]; | |
| @@ -71,6 +71,9 @@ | |
| [content addSubview:_field]; | |
| [content addSubview:_scrollView]; | |
| + [_timelineView setMinItemSize:CGSizeMake(200, 50)]; | |
| + [_timelineView setMaxItemSize:CGSizeMake(100000, 50)]; | |
| + | |
| return self; | |
| } | |
| @@ -80,11 +83,6 @@ | |
| var bounds = [_scrollView bounds]; | |
| CPLog.debug("new size: " + CPRectGetWidth(bounds) + " x " + CPRectGetHeight(bounds)); | |
| - | |
| - var newSize = CGSizeMake(CPRectGetWidth(bounds), 60); | |
| - | |
| - [_timelineView setMinItemSize:newSize]; | |
| - [_timelineView setMaxItemSize:newSize]; | |
| } | |
| - (void)show |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment