title: Dismiss iPad Keyboard
body: <p>I am creating an iOS application for iPhone and iPad and some of my screens have UITextFields. I want the keyboard to be dismissed when the user clicks off of the text box. To do this I have wrote the following code:</p>
  
  <pre><code>-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
       [firstName resignFirstResponder];
       [lastName resignFirstResponder];
       [email resignFirstResponder];
       [password resignFirstResponder];
       [retypePassword resignFirstResponder];
  }
  </code></pre>
  
  <p>This works fine for the iPhone, but it doesn't work for the keyboard on iPad. I have searched on the net and all the sugeestions do not work. The main suggestion is:</p>
  
  <pre><code>- (BOOL)disablesAutomaticKeyboardDismissal {
         return NO;
  }
  </code></pre>
  
  <p>But this still does not work?
  Any help would appreciated.</p>