3
在调试没有错误。代码不会进入下一个页面中的登录被接受后...帮助请为什么我的代码不进入下一个视图
if (emailValue == userEmail || passValue == userPassword) {
//store user information in the app to maintain session
let defaults = UserDefaults.standard
defaults.set(usernameValue, forKey: "usernameValue")
defaults.set(nameValue, forKey: "nameValue")
defaults.set(emailValue, forKey: "emailValue")
// Display Alert Message with confirmation
let myAlert = UIAlertController(title: "Success!", message: Constants.SucessMessages.EIRP, preferredStyle: UIAlertControllerStyle.alert);
let okAction = UIAlertAction(title: "Ok", style: UIAlertActionStyle.default){ action in
self.dismiss(animated: true, completion: nil);
if let navController = self.navigationController {
navController.popViewController(animated: true)
}
}
myAlert.addAction(okAction);
OperationQueue.main.addOperation {
self.present(myAlert, animated: true, completion: nil)
}
}
其自带的内部确定行动 –
@PAB PAB,要进入下一个画面,但你使用的代码是将先前的屏幕Ø okAction正水龙头 – Hooda