Skip to content

Commit b6d1e5e

Browse files
committed
docs: Update version
1 parent a3c2a5d commit b6d1e5e

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

README.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
![Platform: iOS 13+](https://img.shields.io/badge/platform-iOS%2013%2B-blue?style=flat&logo=apple)
33
![SwiftPM compatible](https://img.shields.io/badge/SPM-compatible-brightgreen?style=flat&logo=swift)
44
[![License: MIT](https://img.shields.io/badge/license-MIT-lightgrey?style=flat)](https://github.com/aaronLab/SweetCardScanner/blob/main/LICENSE)
5-
[![Release version](https://img.shields.io/badge/release-v1.0.0.beta.2-blue)](https://github.com/aaronLab/SweetCardScanner/releases)
5+
[![Release version](https://img.shields.io/badge/release-v1.0.0-blue)](https://github.com/aaronLab/SweetCardScanner/releases)
66

77
# Unlocker
88

@@ -74,10 +74,10 @@ https://github.com/aaronLab/Unlocker
7474
- `threshold: Float = 50.0`:
7575

7676
- The default value is `50.0`
77-
- This is the `threshold` where `the completion would start`.
77+
- This is the `threshold` where `the completion would start`.
7878
- Also this will make your `slider disabled` to `prevent the slider works multiple times during the process`.
7979
- When the user swipe the slider more than the percentage of this value in the screen, the action closure will be triggered.
80-
80+
8181
- `duration: Double = 0.3`:
8282

8383
- The default value is `0.3`
@@ -100,68 +100,68 @@ import SwiftUI
100100
import Unlocker
101101

102102
struct CapsuleShape: View {
103-
103+
104104
@State private var disabled: Bool = false
105105
@State private var percentage: Float = 0.0
106-
106+
107107
var body: some View {
108-
108+
109109
ZStack {
110-
110+
111111
Color.gray
112-
112+
113113
// Background
114114
HStack {
115115
Spacer(minLength: 0)
116116
Text("Slide to Unlock")
117117
Image(systemName: "chevron.right.2")
118118
} //: H
119119
.padding(.trailing)
120-
120+
121121
// Slider
122122
Unlocker(disabled: $disabled, percentage: $percentage, minPercentage: 25, threshold: 50.0) { sliderWidth in
123123
ZStack {
124-
124+
125125
// Slider Background
126126
Rectangle()
127127
.foregroundColor(.primary)
128-
128+
129129
/*
130130
You can choose when you are going to show your content
131131
with the escaping parameter(CGFloat), which is the slider's width.
132132
*/
133133
if sliderWidth > UIScreen.main.bounds.width / 3.0 {
134-
134+
135135
// Slider Content
136136
HStack {
137-
137+
138138
Text("Slide to Unlock")
139139
.foregroundColor(.blue)
140140
.lineLimit(1)
141141
.padding(.leading)
142-
142+
143143
Image(systemName: "chevron.right.2")
144144
.foregroundColor(.blue)
145-
145+
146146
Spacer(minLength: 0)
147-
147+
148148
} //: H
149-
149+
150150
} else {
151-
151+
152152
/*
153153
Placeholder Image before slide
154154
*/
155155
Image(systemName: "chevron.right.2")
156156
.foregroundColor(.blue)
157-
157+
158158
}
159-
159+
160160
}
161161
} completion: {
162162
// Your task here
163163
print("CapsuleShape Process Started")
164-
164+
165165
/*
166166
Since the slider will be "disabled" after fully swiped,
167167
you will need to toggle "disabled" parameter at the end of your process,
@@ -176,8 +176,8 @@ struct CapsuleShape: View {
176176
disabled.toggle()
177177
}
178178
}
179-
180-
179+
180+
181181
} //: Z
182182
.font(.system(size: 12))
183183
.frame(height: 60)
@@ -187,9 +187,9 @@ struct CapsuleShape: View {
187187
*/
188188
.clipShape(Capsule())
189189
.padding()
190-
190+
191191
}
192-
192+
193193
}
194194
```
195195

0 commit comments

Comments
 (0)