Closed jimijon closed 4 years ago
@jimijon probably your range
value is outside of a default 0..1 range
_value ClosedRange
This use to work in the old version... I think v0.6
@jimijon it defaults to in bounds: ClosedRange<V> = 0.0...1.0
change it to your range and I think it will work.
OH THE INITS! I missed those (upgrading threw me off)
This fixes both of my issues:
return RangeSlider(range: $range, in: lBound...uBound, step: 1, onEditingChanged: { value in if !value {self.queryCallback()}}) .rangeSliderStyle( HorizontalRangeSliderStyle(
track:
HorizontalRangeTrack(
view: Capsule().foregroundColor(Color("TPOrange"))
)
.background(Capsule().foregroundColor(Color("TPOrange").opacity(0.30)))
.frame(height: 8),
lowerThumb: Circle().foregroundColor(Color(UIColor(named: "TPLightGrey")!)),
upperThumb: Circle().foregroundColor(Color(UIColor(named: "TPLightGrey")!)),
lowerThumbSize: CGSize(width: 32, height: 32),
upperThumbSize: CGSize(width: 32, height: 32),
options: .forceAdjacentValue
)
).padding([.horizontal]).frame(height: 64)
Used a simple example:
But the thumbs don't show. Any ideas?