Just been trying out the slider as a volume control for my game (Cocos2D iPhone 2.1). It, mostly, works REALLY well...
slider = [CCControlSlider sliderWithBackgroundSprite:[CCSprite spriteWithSpriteFrameName:@"Slider-Bar.png"]
progressSprite:[CCSprite spriteWithSpriteFrameName:@"Slider-Bar-Progress.png"]
thumbSprite:[CCSprite spriteWithSpriteFrameName:@"Slider-Pin.png"]];
[slider setMinimumValue:0.0f];
[slider setMaximumValue:1.0f];
NSNumber *defaultVolume = [SDCloudUserDefaults objectForKey:@"OptionsVolume"];
[self updateVolume:((defaultVolume != nil) ? [defaultVolume floatValue] : 1.0f) setSliderValue:YES];
[slider setBlock:^(CCControlSlider *sender, CCControlEvent event) {
[self updateVolume:sender.value setSliderValue:NO];
} forControlEvents:CCControlEventValueChanged];
[slider setAnchorPoint:ccp(0.5f, 1.0f)];
[slider setPosition:ccp(winSize.width * 0.5f, winSize.height * 0.66f)];
[self addChild:slider];
CCLabelBMFont *volumeLabel = [CCLabelBMFont labelWithString:@"Volume"
fntFile:@"fntFipps-medium.fnt"
width:winSize.width
alignment:kCCTextAlignmentCenter];
[volumeLabel setAnchorPoint:ccp(0.5f, 0.0f)];
[volumeLabel setPosition:ccpAdd(slider.position, ccp(0.0f, 8.0f))];
[self addChild:volumeLabel];
On my iPhone5, this works perfectly. On all simulators, this works perfectly.
On my iPad3 and my friends' iPhone 5S' the framerate while dragging is terrible. It only seems to update when you stop dragging your finger, or you do it slowly.
A separate issue is that it works when the options menu scene loads the first time, however after playing the game and quitting back to the menu, the option scene loads but I cannot drag the button on the slider. The init code above runs and it looks like the block gets added, but it seems no touch events are getting sent to it. The Back menu button on the same page works though, so the layer/scene is getting touches.