だから私はカスタムスライダーに取り組んでおり、これを得るのにかなり近づいていますが、これを最も近い5に丸める方法を理解できないようです.誰かがこれを整理するのを手伝ってくれますか?
int distance = progress;
roundedValue = roundf(distance / 5.0f) * 5.0f;
int distanceInt = (int) roundedValue;
return [NSString stringWithFormat:@"%i", distanceInt];
前もって感謝します!