ViewControllerでUIAlertViewControllerを実行する際に問題が発生しました。UIAlertControllerを実行中にnilを取得する
これは、私は現在、私はDerivedData何も削除しようとしました
func displayLoginResult(viewModel: Login.PerformLogin.ViewModel) {
endLoader(loader: loaderLogin)
if let errorMessage = viewModel.displayedError {
print(errorMessage.message)
let alert = UIAlertController(title: "Error", message: "Enter data in Text fields", preferredStyle: UIAlertControllerStyle.Alert)
alert.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.Default, handler: nil))
self.presentViewController(alert, animated: true, completion: nil)
}
else {
router.navigateToGroupsScene()
}
}
を持っているものです。私はviewModel.displayedErrorがnilではないケースを考慮しています(elseケースではなく、ifだけ)。
self.presentViewController(alert, animated: true, completion: nil)
すべての作品をしかし、明らかに任意のダイアログは、私が欲しいものではありませんどの表示されます。私は、この行をコメント場合見てきました。私はこのような問題は一度もなかったので、少し欲求不満で、Xcodeは私にあまり情報を提供しません。 Xcodeの上
あなたが必要な任意の更なる情報、ちょうど私が知っていると私はあなたを提供します!
ありがとうございました。あなたはLoginViewControllerクラスにこのコードを追加し、オブザーバを削除するのを忘れたよう
?それは「なし」ですか? – Tj3n