touchesBegan有时不被召唤

时间:2015-04-14 01:27:44

标签: ios swift xcode6.3

我的初始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);

0 个答案:

没有答案