Releases: SwiftArchitect/TGPControls
Releases · SwiftArchitect/TGPControls
Color ticks!
Added color controls for ticks, independently on the left and the right of the slider.
v5.0.3
Swift 4, formatting improvements
Introducing Carthage Support
- Added support for UIImage for ticks, track & thumb
- Fixed rightmost tick not being drawn
- Cleaner demo
Swift 3
v2.1.0
UISlider compatibility
2.0.0 Upgrade Notes
If you were using previous versions of TGPControls, you may need to address the following:
- search and replace instances of
thumbColor
bythumbTintColor
. It is the same property adoptingUISlider
naming convention. tintColor
now affects the right side of the slider (the opposite of what it used to be). Again, this is adoptingUISlider
behavior convention.- 2 new properties are available:
minimumTrackTintColor
andmaximumTrackTintColor
, also adoptingUISlider
behavior convention.
Cosmetic changes
- The
ComponentStyleIOS
thumb responds tothumbTintColor
. It has be reduced ever so slightly to match iOS 9 appearance. - The
ComponentStyleIOS
track matches the iOS track colors exactly. - The track can be drawn at any size and maintain its color, clipping and integrity, even when the thumb is invisible.
- ticks color is controlled by
tintColor
, and is not overruled byminimumTrackTintColor
.
UIControlEvents, Fill with alpha
Fixes #13, @hebertialmeida's #15, #16 .
-
Support for UIControlEvents, fired in the same order as with UISlider
Add listener:self.discreteSlider.addTarget(self, action: "touchUpInside:event:", forControlEvents: .TouchUpInside)
Listen:
func touchUpInside(sender: UIControl, event:UIEvent) { print("touchUpInside") }
-
Use
CGContextSetFillColorWithColor
to support alpha channel
Production release
Animated labels and discrete slider with customizable ticks, track, thumb, color, images. Use Core Animation (CALayer) for smooth animation. Very responsive, elegant.
Most of all, a snap to drop as a replacement of UISlider.