我的初始Login ViewController中有touchesBegan
来解除键盘并取消自定义AlertView。虽然它最初有效,但在我使用touchesBegan
注销后未调用performSegueWithIdentifier
。
//to resign keyboard
override func touchesBegan(touches: Set<NSObject>, withEvent event: UIEvent) {
println("touchesBegan");
self.view.endEditing(true)
loginAlert.hideView()
signupAlert.hideView()
}
//Logout
self.performSegueWithIdentifier("gotoLoginSegue", sender: self);