diff --git a/Example/StepperView/ExampleView11.swift b/Example/StepperView/ExampleView11.swift index dfae8bb..63c21ad 100644 --- a/Example/StepperView/ExampleView11.swift +++ b/Example/StepperView/ExampleView11.swift @@ -31,51 +31,98 @@ struct ExampleView11: View { var body: some View { ScrollView(.vertical, showsIndicators: false) { VStack(alignment: .leading, spacing: 10) { - StepperView() - .addSteps([ - CustomStepTextView(text: "Card details"), - CustomStepTextView(text: "Application review"), - CustomStepTextView(text: "Authenticate OTP"), - CustomStepTextView(text: "Create password") - ]) - .indicators([ - StepperIndicationType.custom(IndicatorImageView(name: "completed")), - StepperIndicationType.custom(IndicatorImageView(name: "completed")), - StepperIndicationType.custom(IndicatorImageView(name: "completed")), - StepperIndicationType.custom(IndicatorImageView(name:"pending")) - ]) - .lineOptions(StepperLineOptions.rounded(4, 8, Color(customGreen))) - .stepLifeCycles([StepLifeCycle.completed, .completed, .completed, .pending]) - .spacing(40) - .padding(.leading, 50) + Section(header: Text("Horizontal").foregroundColor(Color.black).font(.headline).padding()) { + ScrollView(Axis.Set.horizontal, showsIndicators: false) { + StepperView() + .addSteps([ + CustomStepTextView(text: "Card details"), + CustomStepTextView(text: "Application review"), + CustomStepTextView(text: "Authenticate OTP"), + CustomStepTextView(text: "Create password") + ]) + .indicators([ + StepperIndicationType.custom(IndicatorImageView(name: "completed")), + StepperIndicationType.custom(IndicatorImageView(name: "completed")), + StepperIndicationType.custom(IndicatorImageView(name: "completed")), + StepperIndicationType.custom(IndicatorImageView(name:"pending")) + ]) + .stepIndicatorMode(StepperMode.horizontal) + .lineOptions(StepperLineOptions.rounded(4, 8, Color(customGreen))) + .stepLifeCycles([StepLifeCycle.completed, .completed, .completed, .completed, .completed ]) + .spacing(70) + .padding(.all, 40) + } + + ScrollView(Axis.Set.horizontal, showsIndicators: false) { + StepperView() + .addSteps(cells) + .indicators(indicators) + .stepIndicatorMode(StepperMode.horizontal) + .lineOptions(StepperLineOptions.rounded(4, 8, Color(customGreen))) + .stepLifeCycles([StepLifeCycle.completed, .completed, .pending, .pending]) + .spacing(70) + .padding(.all, 40) + } + + StepperView() + .addSteps([ + CustomStepTextView(text: "Announced"), + CustomStepTextView(text: "Dividend Payment") + ]) + .indicators([ + StepperIndicationType.custom(IndicatorImageView(name: "completed")), + StepperIndicationType.custom(IndicatorImageView(name: "completed")) + ]) + .stepIndicatorMode(StepperMode.horizontal) + .lineOptions(StepperLineOptions.rounded(4, 8, Color(customGreen))) + .stepLifeCycles([StepLifeCycle.completed, .completed ]) + .spacing(70) + .padding(.all, 40) + } Divider() - StepperView() - .addSteps(cells) - .indicators(indicators) - .lineOptions(StepperLineOptions.rounded(4, 8, Color(customGreen))) - .stepLifeCycles([StepLifeCycle.completed, .completed, .pending, .pending]) - .spacing(40) - .padding(.leading, 50) - - Divider() - - - - StepperView() - .addSteps([ - CustomStepTextView(text: "Announced"), - CustomStepTextView(text: "Dividend Payment") - ]) - .indicators([ - StepperIndicationType.custom(IndicatorImageView(name: "completed")), - StepperIndicationType.custom(IndicatorImageView(name: "completed")) - ]) - .lineOptions(StepperLineOptions.custom(4, Color(customGreen))) - .stepLifeCycles([StepLifeCycle.completed, .completed ]) - .spacing(50) - + Section(header: Text("Vertical").foregroundColor(Color.black).font(.headline).padding()) { + StepperView() + .addSteps([ + CustomStepTextView(text: "Card details"), + CustomStepTextView(text: "Application review"), + CustomStepTextView(text: "Authenticate OTP"), + CustomStepTextView(text: "Create password") + ]) + .indicators([ + StepperIndicationType.custom(IndicatorImageView(name: "completed")), + StepperIndicationType.custom(IndicatorImageView(name: "completed")), + StepperIndicationType.custom(IndicatorImageView(name: "completed")), + StepperIndicationType.custom(IndicatorImageView(name:"pending")) + ]) + .lineOptions(StepperLineOptions.rounded(4, 8, Color(customGreen))) + .stepLifeCycles([StepLifeCycle.completed, .completed, .completed, .pending]) + .spacing(40) + .padding(.leading, 50) + + StepperView() + .addSteps(cells) + .indicators(indicators) + .lineOptions(StepperLineOptions.rounded(4, 8, Color(customGreen))) + .stepLifeCycles([StepLifeCycle.completed, .completed, .pending, .pending]) + .spacing(40) + .padding(.leading, 50) + + StepperView() + .addSteps([ + CustomStepTextView(text: "Announced"), + CustomStepTextView(text: "Dividend Payment") + ]) + .indicators([ + StepperIndicationType.custom(IndicatorImageView(name: "completed")), + StepperIndicationType.custom(IndicatorImageView(name: "completed")) + ]) + .lineOptions(StepperLineOptions.custom(4, Color(customGreen))) + .stepLifeCycles([StepLifeCycle.completed, .completed ]) + .spacing(50) + .padding(.leading, 10) + } } } } diff --git a/README.md b/README.md index f6fe1a4..e154b71 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ StepperView is available through [CocoaPods](https://cocoapods.org). To install it, simply add the following line to your Podfile. ```ruby -pod 'StepperView','~> 1.6.1' +pod 'StepperView','~> 1.6.2' ``` ## Carthage @@ -74,7 +74,7 @@ pod 'StepperView','~> 1.6.1' [Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. To integrate StepperView into your Xcode project using Carthage, specify it in your Cartfile: ```ruby -github "badrinathvm/stepperView" == 1.6.1 +github "badrinathvm/stepperView" == 1.6.2 ``` ## Swift Package Manager @@ -83,7 +83,7 @@ StepperView is available through [Swift Package Manager](https://swift.org/packa ```ruby dependencies: [ - .package(url: "https://github.com/badrinathvm/StepperView.git", from: "1.6.1") + .package(url: "https://github.com/badrinathvm/StepperView.git", from: "1.6.2") ] ``` @@ -108,6 +108,7 @@ dependencies: [



