在viewWillDisAppear:或其他離開時呼叫的方法中使用:
[self.view endEditing:YES];
此方法的好處在於通用,不需要知道哪個view是first responder.
參考連結:http://stackoverflow.com/questions/1823317/get-the-current-first-responder-without-using-a-private-api
在viewWillDisAppear:或其他離開時呼叫的方法中使用:
[self.view endEditing:YES];
此方法的好處在於通用,不需要知道哪個view是first responder.
參考連結:http://stackoverflow.com/questions/1823317/get-the-current-first-responder-without-using-a-private-api