Everyone can be used and customized in various ways without errors in SwiftUI
Existing Stepper don't working properly in navigationLink
But SuperStepper made up for them
Actually, It's so convenient to use 🙌
Just crazy simple
import SuperStepper first 💪
- Basic
struct YourView: View {
@State var count: Int = 1
var body: some View {
VStack {
SuperStepperView(count: $count)
Text("count number is \(count)")
}
}
}
need to state property for binding with SuperStepper
- Customize
struct YourView: View {
@State var count: Int = 1
var body: some View {
VStack {
SuperStepperView(
count: $count,
steppingCount: 2,
minimumCount: 10,
maximumCount: 30,
decreaseTitleText: "DOWN",
increaseTitleText: "UP",
decreaseTitleColor: .red,
minimumDecreaseTitleColor: .gray,
increaseTitleColor: .blue,
maximumIncreaseTitleColor: .gray,
decreaseTitleFont: .body,
increaseTitleFont: .body,
separatorColor: .black,
seperatorWidth: 5,
separatorHeight: 20,
backgroundColor: .yellow,
borderColor: .blue,
borderLineWidth: 1,
cornerRadius: 5,
stepperSpacing: 5
)
Text("count number is \(count)")
}
}
}
Everything we want 😀
If your're curious, use the code in the example forlder
v0.1.1
✨ The initial setting of the SuperStepperv0.1.2
♻️ Modularize the SuperStepperv0.1.3
✨ Add the disabled function of the button♻️ Change the button font we want
✨ Change the SuperStepper border we want
✨ Add support SPM
v1.0.0
✨ Add Support Carthagev1.1.0
✨ Add increment and decrement argumentsonly can use in SwiftUI
- iOS >= 14.0
- Xcode 11 / Swift 5
Add pod 'SuperStepper' to your Podfile.
SuperStepper is available through CocoaPods.
To install it, simply add the following line to your Podfile:
pod 'SuperStepper'
dependencies: [
.package(url: "https://github.com/GREENOVER/SuperStepper.git", .upToNextMajor(from: "1.1.0"))
]
In the Xcode 13.0+ enter SuperStepper URL in Add Package Dependency
https://github.com/GREENOVER/SuperStepper
Add below code in your Cartfile
github "GREENOVER/SuperStepper" ~> 1.1.0
In the case below, please send us a PR 🙌
- Typo correction
- Add a better Feature
- Fix Error
- Better clean code
- And everything else that you think of
Please contribute and take your place 🙇🏻
SuperStepper is available under the MIT license. See the LICENSE file for more info.