Allow for arbitrary restrictions enforced by the app; fix for iOS4#4
Open
Clafou wants to merge 2 commits intoreddavis:masterfrom
Open
Allow for arbitrary restrictions enforced by the app; fix for iOS4#4Clafou wants to merge 2 commits intoreddavis:masterfrom
Clafou wants to merge 2 commits intoreddavis:masterfrom
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.