Skip to content

Instantly share code, notes, and snippets.

@Alos
Created December 9, 2011 18:24
Show Gist options
  • Save Alos/1452698 to your computer and use it in GitHub Desktop.
Save Alos/1452698 to your computer and use it in GitHub Desktop.
@implementation MyTabPrototype : TNTabItemPrototype {
}
+ (void)initialize{
TNTabViewTabButtonColorNormal = [CPColor colorWithPatternImage:[[CPThreePartImage alloc] initWithImageSlices:[
[[CPImage alloc] initWithContentsOfFile:@"Resources/tabitem-normal-leftx.png" size:CPSizeMake(9, 22)],
[[CPImage alloc] initWithContentsOfFile:@"Resources/tabitem-normal-center.png" size:CPSizeMake(1, 22)],
[[CPImage alloc] initWithContentsOfFile:@"Resources/tabitem-normal-right.png" size:CPSizeMake(9, 22)]]
isVertical:NO]];
TNTabViewTabButtonColorPressed = [CPColor colorWithPatternImage:[[CPThreePartImage alloc] initWithImageSlices:[
[[CPImage alloc] initWithContentsOfFile:@"Resources/tabitem-pressed-left.png" size:CPSizeMake(9, 22)],
[[CPImage alloc] initWithContentsOfFile:@"Resources/tabitem-pressed-center.png" size:CPSizeMake(1, 22)],
[[CPImage alloc] initWithContentsOfFile:@"Resources/tabitem-pressed-right.png" size:CPSizeMake(9, 22)]]
isVertical:NO]];
TNTabViewTabButtonColorActive = [CPColor colorWithPatternImage:[[CPThreePartImage alloc] initWithImageSlices:[
[[CPImage alloc] initWithContentsOfFile:@"Resources/tabitem-active-left.png" size:CPSizeMake(9, 22)],
[[CPImage alloc] initWithContentsOfFile:@"Resources/tabitem-active-center.png" size:CPSizeMake(1, 22)],
[[CPImage alloc] initWithContentsOfFile:@"Resources/tabitem-active-right.png" size:CPSizeMake(9, 22)]]
isVertical:NO]];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment