-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExampleSticksAnimations.swift
More file actions
64 lines (49 loc) · 2.11 KB
/
ExampleSticksAnimations.swift
File metadata and controls
64 lines (49 loc) · 2.11 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
//
// ExampleSticksAnimations.swift
// SSSwiftUIAnimations
//
// Created by Brijesh Barasiya on 25/10/24.
//
import SwiftUI
struct ExampleSticksAnimations: View {
// MARK: - Variables
@State private var percentage: Double = 0
var body: some View {
VStack {
Text("Horizontal Loading")
.frame(maxWidth: .infinity, alignment: .leading)
.padding(.leading, 20)
StickAnimations(type: .linearLoading(), duration: 3)
.frame(width: 200, height: 80)
Spacer().frame(height: 20)
Text("Circular Loading")
.frame(maxWidth: .infinity, alignment: .leading)
.padding(.leading, 20)
StickAnimations(type: .circularLoading, duration: 3)
.frame(width: 200, height: 80)
Spacer().frame(height: 20)
Text("Horizontal Progress")
.frame(maxWidth: .infinity, alignment: .leading)
.padding(.leading, 20)
StickAnimations(type: .linearProgressBar(percentage: $percentage), duration: 3)
.frame(width: 200, height: 80)
Spacer().frame(height: 20)
Text("Circular Progress")
.frame(maxWidth: .infinity, alignment: .leading)
.padding(.leading, 20)
StickAnimations(type: .circularProgressBar(percentage: $percentage), duration: 3)
.frame(width: 200, height: 80)
Spacer().frame(height: 20)
Text("Circular Reversable Progress")
.frame(maxWidth: .infinity, alignment: .leading)
.padding(.leading, 20)
StickAnimations(type: .circularReversableProgressBar(percentage: $percentage), duration: 3)
.frame(width: 200, height: 80)
Slider(value: $percentage, in: 1...100)
.padding(.horizontal, 30)
}.customToolbar(title: "Stick Animations Example", fontSize: 17)
}
}
#Preview {
ExampleSticksAnimations()
}