From d0b57228ce0cb722423f1d20a7b81bf985692c72 Mon Sep 17 00:00:00 2001 From: Christian Bianciotto Date: Sun, 30 Mar 2014 18:56:56 +0200 Subject: [PATCH] fix issue #19 --- EFCircularSlider/EFCircularSlider.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {