Skip to content

Latest commit

 

History

History
28 lines (21 loc) · 1.01 KB

README.md

File metadata and controls

28 lines (21 loc) · 1.01 KB

LabeledStepper

A native SwiftUI Stepper that shows the value with more features! (like long press to repeat) ;)

Screen Shot 2022-01-13 at 16 16 51

Features

  • Long press to increase or decrease the value automatically
  • Change the repeat speed of the long-press
  • Limitable range
  • Custom theme
  • Custom sizing for each component
  • Exact same API with the Native SwiftUI.Stepper
  • Enhanced animations

Using it in a List or a Form

In Vanilla Swift's behavior, button actions differed and overridden with the row action (which is unexpected in my POV). To make any button (including stepper's buttons) work as expected in a List or a Form, you need to set the button style to ANYTHING-BUT-THE-AUTOMATIC like:

LabeledStepper(
  "Title",
  description: "Description",
  value: $value
)
.buttonStyle(.plain) // 👈 Any style but the `automatic` here.