Skip to content

Comments

Allow for arbitrary restrictions enforced by the app; fix for iOS4#4

Open
Clafou wants to merge 2 commits intoreddavis:masterfrom
Clafou:master
Open

Allow for arbitrary restrictions enforced by the app; fix for iOS4#4
Clafou wants to merge 2 commits intoreddavis:masterfrom
Clafou:master

Conversation

@Clafou
Copy link

@Clafou Clafou commented Mar 30, 2013

I use this control in an app where the slider values are constrained to match pretty complex rules (to time increments that are expressed in weeks or months or years based on an exponential scale) and this sort of logic needs to be able to live outside of the slider control, simply by readjusting the slider left and right values in the app itself in response to change events. Currently, doing so confuses the range slider code and dragging just doesn't work properly. Making it work turned out to be a minor change, so here's a pull request of it.

I also updated the sample app to demonstrate such arbitrary restrictions (but it's pretty daft so please don't take the changes to the sample app, only the edits to REDRangeSlider.h/.m)

Also fixed a crash when running on iOS4.

Clafou added 2 commits March 30, 2013 23:04
…strained arbitrarily by the app. As demonstrated by adding restrictions to the sample app.
UIImage's resizableImageWithCapInsets is only available from iOS5.
Adding detection and use of an alternative API on older platforms.
Tested on iOS4, fixes the crash.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant