Swift2.0 アラートの表示
アラートの表示!!下記メソッドコピペで使えます。
1 2 3 4 5 6 7 8 9 10 |
func AlertShow(){ let alertController = UIAlertController(title: "ここにアラートタイトル", message: "ここにアラートのメッセージ", preferredStyle: .Alert) let defaultAction = UIAlertAction(title: "OK", style: .Default, handler: nil) alertController.addAction(defaultAction) presentViewController(alertController, animated: true, completion: nil) } |
以上メソッドでアラートを表示することができます。