Various fixes and improvements #16
Open
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.
Summary
Background color issue
There was no way to apply a styling with a background color and masking the background to the various styling options.
In order to fix this, you need to have a dedicated property for the style color. The property is called styleColor.
You can still use the backgroundColor property as before, but it will not mask to the selected style.
Most of the work for this fix was already done in the StyledLabel pod (Framework), so I removed the classes from this project and added the framework reference to the podfile.
Symbol label background
After the symbols were pressed, the symbol background was set to backgroundColor (now styleColor), it must be reverted to .clear color.
Format String
In order to correctly format values in the thumb, you must have a way to specify the formatting. This PR introduces the thumbTextFormatString. Default is 'nil', which results in the old behaviour.
An example of how bad the UI looks without formatting is by using a [0;1] range with a 0.1 step value and apply sliding. The thumb text will show "0.7239749579" or similar.
Step Factor
When sliding the stepper, then the increase/decrease of the value is fine as long you are operating on integers. A multiplying factor is needed when you have floating point values.
The examples have been updated to reflect the changes and demonstrations of the new features are included in the examples.
It would be nice with a new major release of this library, as the current release is based on Swift 2.3 and that version is no longer available in the current Xcode.