Skip to content

Commit

Permalink
fix json
Browse files Browse the repository at this point in the history
  • Loading branch information
XanderXu committed Apr 14, 2024
1 parent 0fd5451 commit f4a0a8e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions Demo/HandDemo/HandVectorDemo/Views/RecordAndMatch.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ struct RecordAndMatch: View {

var body: some View {
@Bindable var model = model
VStack(alignment: /*@START_MENU_TOKEN@*/.center/*@END_MENU_TOKEN@*/, spacing: 20) {
VStack(alignment: .center, spacing: 20) {
Toggle("Start hand tracking", isOn: $model.turnOnImmersiveSpace)
.toggleStyle(ButtonToggleStyle())
.font(.system(size: 16, weight: .bold))
Expand All @@ -41,7 +41,7 @@ struct RecordAndMatch: View {
Button {
countDown = 3
} label: {
Text("Read to record")
Text("Ready to record")
.font(.system(size: 16, weight: .bold))
}
.disabled(countDown > -1 || !model.turnOnImmersiveSpace)
Expand Down Expand Up @@ -82,8 +82,9 @@ struct RecordAndMatch: View {
Button("OK", role: .cancel) {
showJsonSheet = false
}
.padding(.bottom, 20)
}
.frame(height: 600)
.frame(minHeight: 600)
}

}
Expand Down Expand Up @@ -118,6 +119,11 @@ struct RecordAndMatch: View {

}
}
.onAppear {
if let para = model.recordHand {
jsonString = para.toJson()
}
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@
"Left Hand" = "左手";
"Right Hand" = "右手";
"Both Hands" = "双手";
"Read to record" = "准备开始录制";
"Ready to record" = "准备开始录制";
"check recorded json string" = "查看录制好的 json 字符串";

0 comments on commit f4a0a8e

Please sign in to comment.