質問するログイン新規登録

質問編集履歴

1

誤記修正

2021/11/03 04:12

投稿

eleele28
eleele28

スコア18

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
- ZStack {
51
+ ZStack {
52
-
52
+
53
- Button(action: {
53
+ Button(action: {
54
54
 
55
- //重い処理を非同期で行う
55
+ //重い処理を非同期で行う
56
- DispatchQueue.main.async {
56
+ DispatchQueue.main.async {
57
- //実施
57
+ //実施
58
- self.predictRslt = predictorIns.startInspect(imageName: self.recentImageName + ".JPG")
58
+ self.predictRslt = predictorIns.startInspect(imageName: self.recentImageName + ".JPG")
59
-
59
+
60
- }
60
+ }
61
- }, label: {
61
+ }, label: {
62
- Text("開始")
62
+ Text("開始")
63
- })
63
+ })
64
-
64
+
65
- //測定中はその旨表示する
65
+ //測定中はその旨表示する
66
- if self.isProgressShowing {
66
+ if self.isProgressShowing {
67
- Color.white
67
+ Color.white
68
- .opacity(0.7)
68
+ .opacity(0.7)
69
- .edgesIgnoringSafeArea(.all)
69
+ .edgesIgnoringSafeArea(.all)
70
- .overlay(
70
+ .overlay(
71
- ProgressView("処理中…")
71
+ ProgressView("処理中…")
72
- .foregroundColor(.black)
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
- ```SwiftUI
105
+ ```Swift
106
106
  import Foundation
107
107
 
108
108
  class InspectorModel_Crossing: ObservableObject {