質問編集履歴
3
ソース更新
test
CHANGED
File without changes
|
test
CHANGED
@@ -60,13 +60,91 @@
|
|
60
60
|
|
61
61
|
```Swift
|
62
62
|
|
63
|
-
i
|
63
|
+
import SwiftUI
|
64
64
|
|
65
|
-
|
65
|
+
import Alamofire
|
66
66
|
|
67
|
+
import Kanna
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
struct ItemDetail: View {
|
72
|
+
|
73
|
+
@State var asin:String = ""
|
74
|
+
|
75
|
+
@State var alert_price:String = "0"
|
76
|
+
|
77
|
+
private var item:Item = Item()
|
78
|
+
|
79
|
+
private var test:String = ""
|
80
|
+
|
81
|
+
var body: some View {
|
82
|
+
|
83
|
+
NavigationView{
|
84
|
+
|
85
|
+
VStack{
|
86
|
+
|
87
|
+
HStack{
|
88
|
+
|
89
|
+
Text("ASIN")
|
90
|
+
|
91
|
+
TextField("Input Kindle item ASIN", text:self.$asin, onEditingChanged:{ _ in
|
92
|
+
|
93
|
+
})
|
94
|
+
|
95
|
+
.textFieldStyle(RoundedBorderTextFieldStyle())
|
96
|
+
|
97
|
+
.onAppear(){
|
98
|
+
|
99
|
+
if let a = self.item.asin {
|
100
|
+
|
101
|
+
self.asin = a
|
102
|
+
|
103
|
+
}
|
104
|
+
|
105
|
+
}
|
106
|
+
|
107
|
+
}
|
108
|
+
|
109
|
+
HStack{
|
110
|
+
|
67
|
-
|
111
|
+
Text("AlertPrice")
|
112
|
+
|
113
|
+
TextField("test formatter", value: $alert_price, formatter: NumberFormatter())
|
114
|
+
|
115
|
+
.textFieldStyle(RoundedBorderTextFieldStyle())
|
116
|
+
|
117
|
+
.keyboardType(.numberPad)
|
118
|
+
|
119
|
+
}
|
120
|
+
|
121
|
+
}
|
122
|
+
|
123
|
+
.padding(.all,10)
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
}
|
68
128
|
|
69
129
|
}
|
130
|
+
|
131
|
+
init(item:Item = Item()){
|
132
|
+
|
133
|
+
self.item = Item(context: self.viewContext)
|
134
|
+
|
135
|
+
self.item.asin = "aaa"
|
136
|
+
|
137
|
+
}
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
func saveItem(){
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
}
|
146
|
+
|
147
|
+
}
|
70
148
|
|
71
149
|
```
|
72
150
|
|
2
エラー文言ピックアップ
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
SwiftUI、CoreDataのEntityClassに値を代入できない「unrecognized selector sent to instance」
|
test
CHANGED
@@ -6,7 +6,9 @@
|
|
6
6
|
|
7
7
|
|
8
8
|
|
9
|
-
CoreDataで作成したEntityClassに値を代入するところでエラーがでてしまいます。
|
9
|
+
CoreDataで作成したEntityClassに値を代入するところで下記エラーがでてしまいます。
|
10
|
+
|
11
|
+
unrecognized selector sent to instance
|
10
12
|
|
11
13
|
|
12
14
|
|
1
エラー表記変更
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
SwiftUI、CoreDataのEntityClassに値を代入できない
|
1
|
+
aSwiftUI、CoreDataのEntityClassに値を代入できない
|
test
CHANGED
@@ -12,7 +12,7 @@
|
|
12
12
|
|
13
13
|
### 発生している問題・エラーメッセージ
|
14
14
|
|
15
|
-
|
15
|
+
```Swift
|
16
16
|
|
17
17
|
UncaughtExceptionError: Crashed due to an uncaught exception
|
18
18
|
|
@@ -50,7 +50,7 @@
|
|
50
50
|
|
51
51
|
| | ==BSErrorCodeDescription: OperationFailed
|
52
52
|
|
53
|
-
|
53
|
+
```
|
54
54
|
|
55
55
|
### 該当のソースコード
|
56
56
|
|