Repository navigation
Overriding Selected Minimum/Maximum labels. - #116
Open
MarcCJohnson wants to merge 5 commits into
Open
MarcCJohnson wants to merge 5 commits into
MarcCJohnson wants to merge 5 commits into
Conversation
…bels. If the method is implemented it acts as the boolean value to override the default values so I didn't think it necessary to add a designable to cut the feature off/on. It could be used for any type of transformation. My use case is that my floats are seconds 0 to end of the day and I want timestamps going up and down as the user slides the values. I chose something less meaningful for an example in my 2nd commit.
…ting them to hex in the bottom slider. I made a lot of adjustments to the storyboard because the last slider was below the fold in some of the smaller iPhone sizes. I also pushed them examples closer together and ended up replacing the last example (no labels) with overriden labels. I know it's important functionality but trivial to use as it's just a designable and was running out of room and a bit lazy to try and fit another slider in the limited space. There were a lot of warnings that changed other files in the project but they aren't relevant to the code actual code changes.
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 added another optional method to the protocol that allows the user to override labels based upon the float values.
My use case was to show a timestamp based upon the current second of the day and timestamp increase/decrease as the user slides either slider up or down.
Once the method is implemented the user has full control as to how to convert the float or can ignore it and just pass the value through.
I added an example of usage in the demo.