键盘呼出和隐藏,和 eixt下的close

05. April 2016 Swift 0

override func touchesEnded(touches: Set<UITouch>, withEvent event: UIEvent?) {

input.resignFirstResponder() //键盘失去和获得焦点

}

@IBAction func close(segue:UIStoryboardSegue){

} //绑定storyboard中exit事件,点击退出,需在前一个viewcontroler和当前viewcontroler都叫上。


Leave a Reply

Your email address will not be published. Required fields are marked *