Skip to content

Commit 49368bb

Browse files
InfoCard updates
1 parent c93ead3 commit 49368bb

File tree

7 files changed

+69
-17
lines changed

7 files changed

+69
-17
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"images" : [
3+
{
4+
"filename" : "body position graphic.png",
5+
"idiom" : "universal",
6+
"scale" : "1x"
7+
},
8+
{
9+
"filename" : "body position graphic@2x.png",
10+
"idiom" : "universal",
11+
"scale" : "2x"
12+
},
13+
{
14+
"filename" : "body position graphic@3x.png",
15+
"idiom" : "universal",
16+
"scale" : "3x"
17+
}
18+
],
19+
"info" : {
20+
"author" : "xcode",
21+
"version" : 1
22+
}
23+
}
1.15 KB
Loading
2.47 KB
Loading
3.89 KB
Loading

Sources/SprenUI/UI/Screens/Flows/BodyComp/CameraScreen/CameraScreen.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ struct CameraScreen: View {
1616
@Environment(\.rootPresentationMode) private var rootPresentationMode: Binding<RootPresentationMode>
1717

1818
@State private var isTimerOpen = false
19-
@State private var infoTimer = 10
19+
@State private var infoTimer = 3
2020
@State private var navigateTo: String?
2121
@State private var selectedImage: UIImage?
2222
@State private var currentFrame: UIImage?

Sources/SprenUI/UI/Screens/Flows/BodyComp/CameraScreen/CameraScreenInfoCard.swift

Lines changed: 43 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,49 @@ struct CameraScreenInfoCard: View {
1414
ZStack {
1515
VisualEffectView(effect: UIBlurEffect(style: .dark)).edgesIgnoringSafeArea(.bottom)
1616

17-
HStack(alignment: .top) {
18-
Image(systemName: "exclamationmark.circle.fill")
19-
.resizable()
20-
.aspectRatio(contentMode: .fill)
21-
.foregroundColor(.white)
22-
.frame(width: 25, height: 25)
23-
24-
Text("Please stand with your feet together and your arms out at 45 degrees. 

Make sure your whole body is in the picture.

Match the guide. The indicators will turn green when you are in the correct position.")
25-
.font(.sprenLabel)
26-
.lineLimit(10)
27-
.minimumScaleFactor(0.01)
28-
.foregroundColor(.white)
29-
.padding(.leading, Autoscale.convert(15))
30-
31-
}.padding(Autoscale.convert(24))
32-
}.frame(height: Autoscale.convert(170)).cornerRadius(Autoscale.convert(15)).padding()
17+
VStack(spacing:Autoscale.convert(10)) {
18+
19+
if SprenUI.config.bundle == .module {
20+
Image(SprenUI.config.graphics[.bodyPosition] ?? "", bundle: .module).resizable()
21+
.aspectRatio(contentMode: .fit)
22+
.frame(maxHeight: Autoscale.convert(88))
23+
.padding(.top, Autoscale.convert(10))
24+
.padding(.bottom, Autoscale.convert(10))
25+
26+
}else{
27+
Image(SprenUI.config.graphics[.bodyPosition] ?? "", bundle: .module).resizable()
28+
.aspectRatio(contentMode: .fit)
29+
.frame(maxHeight: Autoscale.convert(88))
30+
.padding(.top, Autoscale.convert(10))
31+
.padding(.bottom, Autoscale.convert(10))
32+
33+
}
34+
35+
HStack {
36+
Text("• Center your whole body in frame")
37+
.multilineTextAlignment(.leading)
38+
.font(.sprenParagraph)
39+
.foregroundColor(.white)
40+
Spacer()
41+
}
42+
43+
HStack {
44+
Text("• Stand with your feet together")
45+
.multilineTextAlignment(.leading)
46+
.font(.sprenParagraph)
47+
.foregroundColor(.white)
48+
Spacer()
49+
}
50+
51+
HStack {
52+
Text("• Put your arms out at 45 degrees")
53+
.multilineTextAlignment(.leading)
54+
.font(.sprenParagraph)
55+
.foregroundColor(.white)
56+
Spacer()
57+
}
58+
}.padding(Autoscale.convert(24)).padding(.horizontal, Autoscale.convert(20))
59+
}.fixedSize(horizontal: false, vertical: true).cornerRadius(Autoscale.convert(15)).padding()
3360
}
3461
}
3562

Sources/SprenUI/UI/Screens/SprenUI/SprenUI+Config.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ extension SprenUI {
3737
.cameraAccessDenied: "cameraAccessDenied",
3838
.incorrectBodyPosition: "IncorrectBodyPosition",
3939
.privacy: "Privacy",
40+
.bodyPosition: "Position",
4041
// .serverError: "ServerError",
4142
.setupGuide: "SetupGuide"
4243
]
@@ -61,6 +62,7 @@ extension SprenUI {
6162
case cameraAccessDenied
6263
case incorrectBodyPosition
6364
case privacy
65+
case bodyPosition
6466
// case serverError
6567
case setupGuide
6668
}

0 commit comments

Comments
 (0)