Easy way to dismiss keyboard?

Seventoes picture Seventoes · Apr 12, 2009 · Viewed 206.2k times · Source

I have quite a few controls scattered throughout many table cells in my table, and I was wondering if there's an easier way to dismiss the keyboard without having to loop through all my controls and resigning them all as the first responder. I guess the question is.. How would I get the current first responder to the keyboard?

Answer

kirby picture kirby · Sep 14, 2010

Try:

[self.view endEditing:YES];