diff --git a/EFCircularSlider/EFCircularSlider.m b/EFCircularSlider/EFCircularSlider.m index f070244..f607f36 100644 --- a/EFCircularSlider/EFCircularSlider.m +++ b/EFCircularSlider/EFCircularSlider.m @@ -237,7 +237,7 @@ -(void)endTrackingWithTouch:(UITouch *)touch withEvent:(UIEvent *)event{ if(_snapToLabels && labelsEvenSpacing != nil) { CGFloat newAngle=0; float minDist = 360; - for (int i=0; i<[labelsEvenSpacing count]; i++) { + for (int i=0; i<[labelsEvenSpacing count]+1; i++) { CGFloat percentageAlongCircle = i/(float)[labelsEvenSpacing count]; CGFloat degreesForLabel = percentageAlongCircle * 360; if(abs(fixedAngle - degreesForLabel) < minDist) {