SXSlider

type:
extension
author:
Malcolm
description:
A simple slider control similar to UISlider
lastupdate:
2011-04-11
compatible:
v1.1
tag:
slider, uislider, form
homepage:
https://gist.github.com/914991
download:
https://gist.github.com/gists/914991/download

Usage

- (id)initWithWidth:(float)width height:(float)height {
    self = [super initWithWidth:width height:height];
	slider = [[SXSlider alloc] init];
	slider.min = -20;
	slider.max = 100;
	[self addChild:slider];
	[slider addEventListener:@selector(onValueChange:) atObject:self forType:SX_SLIDER_EVENT_UPDATED];
    return self;
}
 
- (void)onValueChange:(SPEvent*)event{
	NSLog(@"slider val: %f", slider.value);
}

Changelog

Source Code

Discussion

No comments so far. Feel free to edit this part of the page.