Skip to content

Instantly share code, notes, and snippets.

@angerman
Created March 3, 2009 02:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save angerman/73144 to your computer and use it in GitHub Desktop.
Save angerman/73144 to your computer and use it in GitHub Desktop.
@implementation ZebraList : CPCollectionView
{
CPView _backgroundFrame;
}
+ (void)initialize
{
backgroundImage = [[CPImage alloc] initWithContentsOfFile: "Resources/ZebraList/bg.png" size: CPSizeMake(1, 40)];
}
-(id)initWithFrame:(CPRect)frame
{
self = [super initWithFrame: frame];
_backgroundFrame = [[CPView alloc] initWithFrame:[self bounds]];
[_backgroundFrame setBackgroundColor:[CPColor colorWithPatternImage:backgroundImage]];
[_backgroundFrame setAutoresizingMask: CPViewWidthSizable | CPViewHeightSizable];
[self addSubview: _backgroundFrame];
return self;
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment