Swift
1 func showAlert(){
2
3 let xHandler = { print("Yes")}
4
5 let actYes = WKAlertAction(title: "Yes", style: .Default, handler:xHandler)
6 let actNo = WKAlertAction(title: "NO", style: .Destructive) {
7 print("ON")
8 }
9 let actCancel = WKAlertAction(title: "Cancel", style: .Cancel) {
10 print("Cancel")
11 }
12
13 presentAlertControllerWithTitle("Alert", message: "Are you OK?", preferredStyle: .ActionSheet, actions: [actYes, actNo, actCancel])
14
15 }
Apple Watchのタグをつけましょう
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。