Created
March 3, 2009 02:43
-
-
Save angerman/73144 to your computer and use it in GitHub Desktop.
This file contains 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
@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