override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if (segue.identifier == "login")
{
if (adLabel.text == "" || syerLabel.text == "")
{
let alert = UIAlertController(title: "Uyarı!", message: "Boş Alan Bırakmayınız", preferredStyle: .alert)
alert.addAction(UIAlertAction(title: "Tamam", style: .default) { action in
})
self.present(alert, animated: true, completion: nil)
}
else
{
let next = self.storyboard?.instantiateViewController(withIdentifier: "SWRevealViewController") as! SWRevealViewController
next.loadView()
let nesne:MenuViewController = next.rearViewController as! MenuViewController
nesne.adlabel = adLabel.text!
nesne.syerLabel=syerLabel.text!
self.present(next, animated: true, completion: nil)
}
}
}
获取此错误
<UIView: 0x7fb2bd719f30; frame = (0 0; 375 667); autoresize = W+H; layer = <CALayer: 0x608000237820>>'s window is not equal to <UIAlertController: 0x7fb2bd7218e0>'s view's window!
////
<UIView: 0x7fb2bd719f30; frame = (0 0; 375 667); autoresize = W+H; layer = <CALayer: 0x608000237820>>'s window is not equal to <SWRevealViewController: 0x7fb2be882e00>'s view's window!`
我曾经 dispactquequ.main.async 但我收到此错误其视图不在窗口层次结构中! 谢谢