0

touchesBegan在初始登录 ViewController 中有关闭键盘并取消自定义 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);
4

1 回答 1

0

问题是因为我同时使用了UITapGestureRecognizertouchesBegan。我处理了场景UITapGestureRecognizer并删除了touchesBegan逻辑并修复了

于 2015-04-29T20:21:02.110 回答