DEV Community

Cover image for Input stepper
Mateusz Budnik
Mateusz Budnik

Posted on


Input stepper

Hi! I recently have to implement an input stepper in some iOS app (SwiftUI) and it was not so easy as it may seem. My input stepper had to support long press gesture. I decided to create some library which makes the whole process of creating such a control trivial.

You can find the source code here:

GitHub logo mateusz800 / InputStepper

SwiftUI library to create fully customizable input stepper.

Some basic code:

import InputStepper

  // declare initial value
  @State var value: Float = 120

  var body: some View {
      HStack {
Enter fullscreen mode Exit fullscreen mode

Of course you can customize the view of each element. More on that here.

If you want you can leave in comment some screenshot 📷 of your custom input steppers.

Of course any contribution to the library is welcome.

Top comments (0)

Timeless DEV post...

Git Concepts I Wish I Knew Years Ago

The most used technology by developers is not Javascript.

It's not Python or HTML.

It hardly even gets mentioned in interviews or listed as a pre-requisite for jobs.

I'm talking about Git and version control of course.

One does not simply learn git