質問編集履歴
1
誤記修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -48,36 +48,36 @@
|
|
48
48
|
@State var predictRslt: Int = 0
|
49
49
|
|
50
50
|
var body: some View {
|
51
|
-
|
51
|
+
ZStack {
|
52
|
-
|
52
|
+
|
53
|
-
|
53
|
+
Button(action: {
|
54
54
|
|
55
|
-
|
55
|
+
//重い処理を非同期で行う
|
56
|
-
|
56
|
+
DispatchQueue.main.async {
|
57
|
-
|
57
|
+
//実施
|
58
|
-
|
58
|
+
self.predictRslt = predictorIns.startInspect(imageName: self.recentImageName + ".JPG")
|
59
|
-
|
59
|
+
|
60
|
-
|
60
|
+
}
|
61
|
-
|
61
|
+
}, label: {
|
62
|
-
|
62
|
+
Text("開始")
|
63
|
-
|
63
|
+
})
|
64
|
-
|
64
|
+
|
65
|
-
|
65
|
+
//測定中はその旨表示する
|
66
|
-
|
66
|
+
if self.isProgressShowing {
|
67
|
-
|
67
|
+
Color.white
|
68
|
-
|
68
|
+
.opacity(0.7)
|
69
|
-
|
69
|
+
.edgesIgnoringSafeArea(.all)
|
70
|
-
|
70
|
+
.overlay(
|
71
|
-
|
71
|
+
ProgressView("処理中…")
|
72
|
-
|
72
|
+
.foregroundColor(.black)
|
73
|
-
|
73
|
+
)
|
74
|
-
}
|
75
74
|
}
|
76
|
-
.frame(width: 700)
|
77
75
|
}
|
76
|
+
.frame(width: 700)
|
77
|
+
|
78
78
|
//処理開始時処理
|
79
79
|
.onChange(of: self.predictorIns.proccessingStartedFlg, perform: { value in
|
80
|
-
|
80
|
+
|
81
81
|
self.isProgressShowing = true
|
82
82
|
|
83
83
|
})
|
@@ -102,7 +102,7 @@
|
|
102
102
|
```
|
103
103
|
|
104
104
|
↓処理部
|
105
|
-
```
|
105
|
+
```Swift
|
106
106
|
import Foundation
|
107
107
|
|
108
108
|
class InspectorModel_Crossing: ObservableObject {
|