@IBAction func signinButton(_ sender: AnyObject) {
self.ActivityIndicator.startAnimating()
let id = usernameTextField.text;
let pwd = passwordTextField.text;
if (id!.isEmpty || (pwd!.isEmpty)){
let alert = UIAlertController(title: "Information!", message: "Username and Password is not empety", preferredStyle: UIAlertControllerStyle.alert)
alert.addAction(UIAlertAction(title: "Dismiss", style: UIAlertActionStyle.destructive, handler: nil))
present(alert, animated: true, completion: nil)
self.present(alert, animated: true, completion: nil)
}
}
このエラー: 警告:ビューがウィンドウ階層内に表示されないようにしよう!新しいビューコントローラを表示するコンソール警告
私を助けてください..
このような状況で最初に行うことは、Googleにエラーメッセージです。あなたはそれをして、そこに与えられたアドバイスを試しましたか?そこにたくさんのことがあります。 –
あなたは、警告が最初のものが完了する前であっても2度表示されるようにするために現在のステートメントを2回持っています。したがって、問題 –
の 'present'行が重複しています。 – vadian