Created
March 18, 2015 08:09
-
-
Save sdpjswl/a5d556f5cd1819cc3898 to your computer and use it in GitHub Desktop.
Resign whoever the first responder is
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[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