AdmiralSwiftUI Controls InputNumber - admiral-team/admiralui-ios GitHub Wiki

Overview

InputNumber - A object that displays an editable text area with incrementing or decrementing a value..

Code

@State static var value: Double = 10.0
    InputNumber(
                titleText: .constant("Optional text"),
                value: .constant(10),
                minimumValue: .constant(5.0))

You can create a InputNumber specifying the following parameters in init:

 - titleText - leading text
 - value - the numeric value of the stepper
 - minimumValue - the lowest possible numeric value for the stepper
 - maximumValue - the highest possible numeric value for the stepper
 - stepValue - the step, or increment, value for the stepper. The default value for this property is 1.

Live Example

To run live demo with InputNumber open Xcode and run project with Example target. Then in the main page open Controls/InputNumber:

Contribution

You can help us to find bugs or ask us to add features.

  • To start issue please use ready-made templates.
  • To make changes to the repository, you need to create a fork of the project, make changes to the code and create a pull request in our project. You can read more about this in the Github documentation.