回答編集履歴
1
0
answer
CHANGED
@@ -5,9 +5,8 @@
|
|
5
5
|
|
6
6
|
```swift
|
7
7
|
// キャンセルボタン
|
8
|
-
let cancelAction: UIAlertAction = UIAlertAction(title: "キャンセル", style:
|
8
|
+
let cancelAction: UIAlertAction = UIAlertAction(title: "キャンセル", style: .cancel, handler: { action in
|
9
9
|
// ボタンが押された時の処理を書く(クロージャ実装)
|
10
|
-
(action: UIAlertAction!) -> Void in
|
11
10
|
print("Cancel")
|
12
11
|
})
|
13
12
|
|