eliotfowler / EFCircularSlider

An extensible circular slider for iOS applications
http://eliotfowler.github.io/EFCircularSlider/
MIT License
998 stars 161 forks source link

Degree in circular slider #2

Closed edward-lay closed 10 years ago

edward-lay commented 10 years ago

I love your circular slider! Just a few days and it has already gathered many likes.

Would like to know if it is possible to have a circular slider like the one used in clock to have it used with 999 values. However, the most chosen values are 1-20 so if that is the case, the slider will usually remain in less than the first quarter of the circle.

I was thinking of a circular slider that utilizes degree as a reference, for example, 1-30 belongs to 360 degree. When I slide around within the 360 degree (1 circle), I will be able to choose only 1-30. Continuing the degree toward 720 degree will get me values of the range 30-60 or if there is momentum, the values will be higher and goes straight to 999 when I slide within 3 rounds. This would be fun for the users.

I wonder if this is doable in the current version, if so, how do I proceed? @gissues:{"order":50,"status":"inprogress"}

eliotfowler commented 10 years ago

Thanks for the kind words!

Your request is certainly an interesting one. Indeed, I had been thinking about something like this as I thought it would be pretty neat for AM to switch to PM as you went full-circle with the hour slider.

However, there are definitely some challenges in implementing something like this. For example, it is currently possible to drag the slider to the 7 o'clock position, and then take your finger off and slide from 1 o'clock to 2 o'clock. In this case, it would be very difficult to discern whether the user wanted to go from 7 -> 8 -> 9 -> 10 -> 11 -> 12 -> 1 -> 2 or 7 -> 6 -> 5 -> 3 -> 2.

That said, as a "user" of this control, you could implement all of this functionality in the selector you have passed in to the [slider addTarget:self action:@selector(selector:) forControlEvents:UIControlEventValueChanged] method.