質問編集履歴
1
関数を入力できていなかったので、修正しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -22,12 +22,44 @@
|
|
22
22
|
|
23
23
|
|
24
24
|
|
25
|
-
|
25
|
+
次のようにコードを記述したところ、
|
26
|
-
|
27
|
-
|
28
26
|
|
29
27
|
```Swift
|
30
28
|
|
29
|
+
// UIPickerViewのRowが選択された時の挙動
|
30
|
+
|
31
|
+
func pickerView(_ pickerView: UIPickerView,
|
32
|
+
|
33
|
+
didSelectRow row: Int,
|
34
|
+
|
35
|
+
inComponent component: Int) {
|
36
|
+
|
37
|
+
introduce.text = message[row]
|
38
|
+
|
39
|
+
readimg(rimg:Int)
|
40
|
+
|
41
|
+
|
42
|
+
|
43
|
+
}
|
44
|
+
|
45
|
+
```
|
46
|
+
|
47
|
+
エラーが次のように出ました。
|
48
|
+
|
49
|
+
Cannot convert value of type 'Int.Type' to expected argument type 'Int'
|
50
|
+
|
51
|
+
|
52
|
+
|
53
|
+
どのように記述すれば良いのでしょうか?
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
### 全体のソースコード
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
```Swift
|
62
|
+
|
31
63
|
//
|
32
64
|
|
33
65
|
// ViewController.swift
|
@@ -226,7 +258,9 @@
|
|
226
258
|
|
227
259
|
introduce.text = message[row]
|
228
260
|
|
261
|
+
|
262
|
+
|
229
|
-
|
263
|
+
//ここにどのように関数を指定すれば良いのか?
|
230
264
|
|
231
265
|
}
|
232
266
|
|