You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* [FEAT] started working on documentation. * [UPDATE] text format change [UPDATE] YStepper to StepperControl Alignment [UPDATE] edit periods * [UPDATE] review comment resolved
Copy file name to clipboardExpand all lines: README.md
+229Lines changed: 229 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,235 @@ Documentation is automatically generated from source code comments and rendered
11
11
12
12
Usage
13
13
----------
14
+
### `StepperControl` (UIKit)
15
+
16
+
`StepperControl` is a subclass of `UIControl` with an api similar to `UIStepper`.
17
+
18
+
### `Stepper` (SwiftUI)
19
+
20
+
`Stepper` is a struct that conforms to the SwiftUI `View` protocol.
21
+
22
+
### Initializers
23
+
24
+
Both `StepperControl` and `Stepper`can be initialized with the same five parameters (`StepperControl`uses `Stepper` internally):
25
+
26
+
```swift
27
+
init(
28
+
appearance: StepperControl.Appearance = .default,
29
+
minimumValue: Double=0,
30
+
maximumValue: Double=100,
31
+
stepValue: Double=1,
32
+
value: Double=0
33
+
)
34
+
```
35
+
36
+
The standard initializer lets you specify the appearance, minimum value, maximum value, step value and current value, although it provides sensible defaults for all of these.
37
+
38
+
`StepperControl` has an additional initializer:
39
+
40
+
```swift
41
+
init?(coder: NSCoder)
42
+
```
43
+
44
+
For use in Interface Builder or Storyboards (although we recommend that you build your UI in code).
45
+
46
+
A stepper created this way begins with the default appearance, but you can customize it at runtime by updating its `appearance` property.
47
+
48
+
### Customization
49
+
50
+
`StepperControl` and `Stepper` both have an `appearance` property of type `Appearance`.
51
+
52
+
`Appearance` lets you customize the stepper’s appearance. You have full control over the colors, typographies, and images used. The default appearance is dark mode compatible and WCAG 2.0 AA compliant for color contrast.
53
+
54
+
```swift
55
+
/// Appearance for stepper that contains typography and color properties
0 commit comments