質問編集履歴
2
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
下図のようなエラーが表示され困惑中です
|
2
2
|
|
3
|
-
![](
|
3
|
+
![](a0d53eaf382d56cb0e99b7ce65ae9723.png)
|
4
4
|
|
5
5
|
|
6
6
|
|
1
情報の追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -2,9 +2,7 @@
|
|
2
2
|
|
3
3
|
![](7bfc34005b310f545a79a582b36f4fbb.png)
|
4
4
|
|
5
|
-
以下,ソースコードです.
|
6
5
|
|
7
|
-
![イメージ説明](1472358f0743447ba10ed3a4c9b27f22.png)
|
8
6
|
|
9
7
|
|
10
8
|
|
@@ -15,3 +13,55 @@
|
|
15
13
|
|
16
14
|
|
17
15
|
XcodeVersion 11.5 (11E608c)
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
---------------------------
|
20
|
+
|
21
|
+
追記です.
|
22
|
+
|
23
|
+
<エラーメッセージ(先頭より数行)>
|
24
|
+
|
25
|
+
Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<prototype.ViewController 0x7fe502d08060> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key button.'
|
26
|
+
|
27
|
+
|
28
|
+
|
29
|
+
以下,ソースコード全文です.
|
30
|
+
|
31
|
+
```html
|
32
|
+
|
33
|
+
import UIKit
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
class ViewController: UIViewController {
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
@IBOutlet weak var textField: UITextField!
|
42
|
+
|
43
|
+
@IBOutlet weak var label: UILabel!
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
override func viewDidLoad() {
|
48
|
+
|
49
|
+
super.viewDidLoad()
|
50
|
+
|
51
|
+
// Do any additional setup after loading the view.
|
52
|
+
|
53
|
+
}
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
@IBAction func button(_ sender: UIButton) {
|
58
|
+
|
59
|
+
label.text = textField.text
|
60
|
+
|
61
|
+
}
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
}
|
66
|
+
|
67
|
+
```
|