Skip to content

A native SwiftUI stepper that shows the current value and has more features

Notifications You must be signed in to change notification settings

MojtabaHs/LabeledStepper

Repository files navigation

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.

About

A native SwiftUI stepper that shows the current value and has more features

Resources

Stars

Watchers

Forks

Packages

 
 
 

Languages