Skip to content

Commit 59fa68f

Browse files
committed
insructions
1 parent 375f924 commit 59fa68f

File tree

5 files changed

+79
-1
lines changed

5 files changed

+79
-1
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"images" : [
3+
{
4+
"filename" : "instructionImage.png",
5+
"idiom" : "universal",
6+
"scale" : "1x"
7+
},
8+
{
9+
"idiom" : "universal",
10+
"scale" : "2x"
11+
},
12+
{
13+
"idiom" : "universal",
14+
"scale" : "3x"
15+
}
16+
],
17+
"info" : {
18+
"author" : "xcode",
19+
"version" : 1
20+
}
21+
}
1.71 MB
Loading
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
//
2+
// InstructionsView.swift
3+
// FitCounter
4+
//
5+
// Created by Денис Волхонский on 02.06.2023.
6+
//
7+
8+
import SwiftUI
9+
10+
struct InstructionsView: View {
11+
var body: some View {
12+
VStack {
13+
Color.white
14+
.ignoresSafeArea()
15+
.overlay(
16+
VStack (spacing: 30){
17+
Image("instructionImage")
18+
.resizable()
19+
.scaledToFit()
20+
21+
Text("Instructions")
22+
.font(.title)
23+
.multilineTextAlignment(.center)
24+
Text("1. Place your phone on the floor against the wall\n 2. Press Start button and stand so your whole body is inside the bounding box\n3. Follow voice commands")
25+
.font(.body)
26+
.multilineTextAlignment(.center)
27+
28+
}.frame(width: 300)
29+
)
30+
}
31+
32+
}
33+
}
34+
35+
struct InstructionsView_Previews: PreviewProvider {
36+
static var previews: some View {
37+
InstructionsView()
38+
}
39+
}

FitCount/Workout/QuickPoseBasicView.swift

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,25 @@ struct QuickPoseBasicView: View {
8888
.overlay() {
8989
if (state == WorkoutState.volume) {
9090
VolumeChangeView().overlay(alignment: .bottom) {
91+
Button (action: {
92+
state = WorkoutState.instructions
93+
94+
}) {
95+
Text("Continue").foregroundColor(.white)
96+
.padding()
97+
.background(.indigo) // Set background color to the main color
98+
.cornerRadius(8) // Add corner radius for a rounded look
99+
}
100+
}
101+
}
102+
103+
if (state == WorkoutState.instructions) {
104+
InstructionsView().overlay(alignment: .bottom) {
91105
Button (action: {
92106
state = WorkoutState.bbox
93107
VoiceCommands.standInsideBBox.say()
94108
}) {
95-
Text("Continue").foregroundColor(.white)
109+
Text("Start Workout").foregroundColor(.white)
96110
.padding()
97111
.background(.indigo) // Set background color to the main color
98112
.cornerRadius(8) // Add corner radius for a rounded look

FitCounter by QuickPose.ai.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
920A3EF12A1F7C2300EC6FC9 /* WorkoutResultsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 920A3EF02A1F7C2300EC6FC9 /* WorkoutResultsView.swift */; };
1313
920A3EF32A1F801A00EC6FC9 /* Workout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 920A3EF22A1F801A00EC6FC9 /* Workout.swift */; };
1414
920A3EF62A20B14100EC6FC9 /* PagerTabStripView in Frameworks */ = {isa = PBXBuildFile; productRef = 920A3EF52A20B14100EC6FC9 /* PagerTabStripView */; };
15+
9215905F2A2A10BF001254BC /* InstructionsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9215905E2A2A10BF001254BC /* InstructionsView.swift */; };
1516
924D6E222A264B3600227183 /* JsonWriter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 924D6E212A264B3600227183 /* JsonWriter.swift */; };
1617
924D6E252A289ED700227183 /* AboutView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 924D6E242A289ED700227183 /* AboutView.swift */; };
1718
924D6E282A29F90400227183 /* VolumeChangeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 924D6E272A29F90400227183 /* VolumeChangeView.swift */; };
@@ -55,6 +56,7 @@
5556
920A3EEE2A1F76F800EC6FC9 /* BoundingBoxView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BoundingBoxView.swift; sourceTree = "<group>"; };
5657
920A3EF02A1F7C2300EC6FC9 /* WorkoutResultsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WorkoutResultsView.swift; sourceTree = "<group>"; };
5758
920A3EF22A1F801A00EC6FC9 /* Workout.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Workout.swift; sourceTree = "<group>"; };
59+
9215905E2A2A10BF001254BC /* InstructionsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InstructionsView.swift; sourceTree = "<group>"; };
5860
924D6E212A264B3600227183 /* JsonWriter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JsonWriter.swift; sourceTree = "<group>"; };
5961
924D6E242A289ED700227183 /* AboutView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AboutView.swift; sourceTree = "<group>"; };
6062
924D6E272A29F90400227183 /* VolumeChangeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VolumeChangeView.swift; sourceTree = "<group>"; };
@@ -116,6 +118,7 @@
116118
920A3EF02A1F7C2300EC6FC9 /* WorkoutResultsView.swift */,
117119
920A3EF22A1F801A00EC6FC9 /* Workout.swift */,
118120
924D6E272A29F90400227183 /* VolumeChangeView.swift */,
121+
9215905E2A2A10BF001254BC /* InstructionsView.swift */,
119122
);
120123
path = Workout;
121124
sourceTree = "<group>";
@@ -341,6 +344,7 @@
341344
buildActionMask = 2147483647;
342345
files = (
343346
92CACFD32A1B7DD100DA2B40 /* ContentView.swift in Sources */,
347+
9215905F2A2A10BF001254BC /* InstructionsView.swift in Sources */,
344348
92CACFD12A1B7DD100DA2B40 /* FitCountApp.swift in Sources */,
345349
920A3EEF2A1F76F800EC6FC9 /* BoundingBoxView.swift in Sources */,
346350
920A3EF32A1F801A00EC6FC9 /* Workout.swift in Sources */,

0 commit comments

Comments
 (0)