Skip to content

Instantly share code, notes, and snippets.

@hlship
Created September 14, 2009 18:29
Show Gist options
  • Save hlship/186827 to your computer and use it in GitHub Desktop.
Save hlship/186827 to your computer and use it in GitHub Desktop.
- (void)updateTimeline:(CPArray) timeline
{
var width = CPRectGetWidth([_timelineView bounds]) - 4;
var count = [timeline count];
for (row = 0; row < count; row++)
{
var frame = CGRectMake(2, 64 * row + 2, width, 60);
var view = [[TwitView alloc] initWithFrame:frame forStatus:[timeline objectAtIndex:row]];
[view setAutoresizingMask:CPViewWidthSizable];
[_timelineView addSubview:view];
}
[_timelineView setFrameSize:CGSizeMake(width + 4, 64 * count + 2)];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment