私は、PHPサイトへの投稿が行われた後、AlertControllerを呼び出してユーザーにメッセージを表示しようとしています。 IBActionボタンの中にAlertControllerを呼び出すのに問題があります。助けを前にありがとう。私は何か基本的なものを欠いていると確信しています。ここでUAlertControllerをIBActionボタンから呼び出してください
がやるような
func CreateAlert(title: String, message: String) {
let alertController = UIAlertController(title: title, message:
message, preferredStyle: UIAlertControllerStyle.alert)
alertController.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.default,handler: nil))
self.present(alertController, animated: true, completion: nil)
}
の下にあなたのCreateAlert funcを変更
そして、ここでは私のAlertController
– Alwin聞いてください。コードを変更します。しかし、どのように警告機能を呼び出すのですか? –