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 💪
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
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
only can use in SwiftUI
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 🙌
Please contribute and take your place 🙇🏻
SuperStepper is available under the MIT license. See the LICENSE file for more info.
link |
Stars: 16 |
Last commit: 1 year ago |
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics