-
Notifications
You must be signed in to change notification settings - Fork 67
Expand file tree
/
Copy pathExampleView8.swift
More file actions
80 lines (72 loc) · 3.51 KB
/
ExampleView8.swift
File metadata and controls
80 lines (72 loc) · 3.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
//
// ExampleView8.swift
// StepperView_Example
//
// Created by Venkatnarayansetty, Badarinath on 5/17/20.
// Copyright © 2020 CocoaPods. All rights reserved.
//
import Foundation
import SwiftUI
import StepperView
struct ExampleView8: View {
let indicators = [
StepperIndicationType.custom(CircledIconView(image: Image("tasks"),
width: 30,
strokeColor: Color.black)
.eraseToAnyView()),
StepperIndicationType.custom(CircledIconView(image: Image("branch"),
width: 30,
strokeColor: Color.black)
.eraseToAnyView()),
StepperIndicationType.custom(CircledIconView(image: Image("commit"),
width: 30,
strokeColor: Color.black)
.eraseToAnyView()),
StepperIndicationType.custom(CircledIconView(image: Image("codereview"),
width: 30,
strokeColor: Color.black)
.eraseToAnyView()),
StepperIndicationType.custom(CircledIconView(image: Image("merge"),
width: 30,
strokeColor: Color.black)
.eraseToAnyView())]
let steps = [TextView(text:"Manage Tasks", font: .system(size: 14, weight: .semibold)),
TextView(text:"Branch", font: .system(size: 14, weight: .semibold)),
TextView(text:"Commit", font: .system(size: 14, weight: .semibold)),
TextView(text:"Code review", font: .system(size: 14, weight: .semibold)),
TextView(text:"Merge and release", font: .system(size: 14, weight: .semibold))]
let pitStopLineOptions = [
StepperLineOptions.custom(1, Color.black),
StepperLineOptions.custom(1, Color.black),
StepperLineOptions.custom(1, Color.black),
StepperLineOptions.custom(1, Color.black)
]
let pitStops = [
TextView(text:GithubPitstops.p1).eraseToAnyView(),
TextView(text:GithubPitstops.p2).eraseToAnyView(),
TextView(text:GithubPitstops.p3).eraseToAnyView(),
TextView(text:GithubPitstops.p4).eraseToAnyView(),
TextView(text:GithubPitstops.p5).eraseToAnyView()
]
var body: some View {
List {
StepperView()
.addSteps(steps)
.indicators(indicators)
.addPitStops(pitStops)
.pitStopLineOptions(pitStopLineOptions)
.spacing(100)
}
.padding(.horizontal, -10)
.onAppear {
UITableView.appearance().separatorStyle = .none
}
}
}
struct GithubPitstops {
static var p1 = "\n\nTriage Notifications\nBrowse Repos\nCreate an issue\nComment on issues\nAssign self to issue"
static var p2 = "Fork or Clone repo\ngit checkout -b branch\ngit stash"
static var p3 = "git add -p\ngit diff .\ngit commit -m\ngit push origin branch"
static var p4 = "Open pull request\ngit checkout pr-branch\nReview and comment"
static var p5 = "View checks\ngit rebase\ngit merge\ngit tag"
}