質問編集履歴
1
コード
test
CHANGED
File without changes
|
test
CHANGED
@@ -10,8 +10,30 @@
|
|
10
10
|
|
11
11
|
```ここに言語を入力
|
12
12
|
|
13
|
-
|
13
|
+
// UITextFieldのキーボード上の「Return」ボタンが押された時に呼ばれる処理
|
14
14
|
|
15
|
+
func textFieldShouldReturn(_ textField: UITextField) -> Bool {
|
16
|
+
|
17
|
+
// 受け取った入力値(String型の文字列)をDoubleに変換し、inputに代入
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
input_monney = atof(inputMonney.text) //aotfの時アンラップしなくてもできた
|
24
|
+
|
15
|
-
input_man = Int(inputMan.text)//エラー
|
25
|
+
input_man = Int(inputMan.text)//エラー
|
26
|
+
|
27
|
+
|
28
|
+
|
29
|
+
// キーボードを閉じる
|
30
|
+
|
31
|
+
textField.resignFirstResponder()
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
return true
|
36
|
+
|
37
|
+
}
|
16
38
|
|
17
39
|
```
|