Skip to content

Instantly share code, notes, and snippets.

@sdpjswl
Created March 18, 2015 08:09
Show Gist options
  • Save sdpjswl/a5d556f5cd1819cc3898 to your computer and use it in GitHub Desktop.
Save sdpjswl/a5d556f5cd1819cc3898 to your computer and use it in GitHub Desktop.
Resign whoever the first responder is
[[UIApplication sharedApplication] sendAction:@selector(resignFirstResponder) to:nil from:nil forEvent:nil];
[self.view endEditing:YES];
[self.view.window endEditing:YES];
// source: http://stackoverflow.com/questions/1823317/get-the-current-first-responder-without-using-a-private-api
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment