Skip to content

Instantly share code, notes, and snippets.

@Me1000
Created July 5, 2009 17:24
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 Me1000/141043 to your computer and use it in GitHub Desktop.
Save Me1000/141043 to your computer and use it in GitHub Desktop.
-(id)initWithFrame:(CGRect)aFrame
{
self = [super initWithFrame:aFrame];
if(self){
_upButton = [[CPButton alloc] initWithFrame: CGRectMake(0.0, 0.0, 12.0, 10.0)];
_bottomButtom = [[CPButton alloc] initWithFrame: CGRectMake(0.0, 11.0, 12.0, 12.0)];
_splitter = [[CPView alloc] initWithFrame: CGRectMake(0.0, 10.0, 12.0, 1.0)];
[_upButton setImage:[[CPImage alloc] initWithContentsOfFile:@"Resources/Stepper/stepper_up.png" size:CGSizeMake(12.0, 10.0)]];
[_bottomButton setImage:[[CPImage alloc] initWithContentsOfFile:@"Resources/Stepper/stepper_down.png" size:CGSizeMake(12.0, 12.0)]];
[_splitter setBackgroundColor:[[CPColor alloc] _initWithPatternImage:[[CPImage alloc] initWithContentsOfFile:@"Resources/Stepper/stepper_middle.png" size:CGSizeMake(12.0, 1.0)]]];
[_upButton setAlternateImage:[[CPImage alloc] initWithContentsOfFile:@"Resources/Stepper/stepper_up_highlighted.png" size:CGSizeMake(12.0, 10.0)]];
[_bottomButton setAlternateImage:[[CPImage alloc] initWithContentsOfFile:@"Resources/Stepper/stepper_down_highlighted.png" size:CGSizeMake(12.0, 12.0)]];
[self addSubview:_upButton];
[self addSubview:_bottomButtom];
[self addSubview:_splitter];
}
return self;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment