Thumb image does not move to the edge even when it\'s value is max or min.
Does anyone know how to make it move all the way to the edge of the slider?
It may not be the most efficient, but it seems to work fine. This is another simple way to do it in Objective-C. Basically, you'll play around with the "pixelAdjustment" variable to get the slider where you want it.
- (CGRect)thumbRectForBounds:(CGRect)bounds trackRect:(CGRect)rect value: (float)value {
float multValue = value - 0.5;
float pixelAdjustment = 30; //This is the value you need to change depending on the size of the thumb image of your slider.
float xOriginDelta = (multValue * (bounds.size.width - pixelAdjustment));
CGRect adjustedRect = CGRectMake(bounds.origin.x + xOriginDelta, bounds.origin.y, bounds.size.width, bounds.size.height);
return adjustedRect;
}