spacenation / swiftui-sliders

:rocket: SwiftUI Sliders with custom styles
MIT License
805 stars 85 forks source link

Slider styles #5

Closed ay42 closed 4 years ago

ay42 commented 4 years ago

This will enable support for styles to match behaviour of other SwiftUI native elements (Buttons, Pickers, Toggles)

User should be able to specify slider styles.

.valueSliderStyle(...)
.rangeSliderStyle(...)
.pointSliderStyle(...)

This will use makeBody method

func makeBody(configuration: Self.Configuration) -> Self.Body

This will also rename current slider types to

ValueSlider()
RangeSlider()
PointSlider()

with geometry and interactions moving to styles

HorizontalValueSliderStyle() // Default
VerticalValueSliderStyle()
...