3

I am using MFMailComposeViewController to compose email for my iPhone app. How could I dismiss keyboard after entering 'toRecipients'?

BenMorel
  • 34,448
  • 50
  • 182
  • 322
Nijil Nair
  • 1,608
  • 1
  • 11
  • 14

1 Answers1

2

Try this.

UIWindow* keyWindow = [[UIApplication sharedApplication] keyWindow];
UIView* firstResponder = [keyWindow performSelector:@selector(firstResponder)];
[firstResponder resignFirstResponder];

But Also Remember.

Important: The mail composition interface itself is not customizable and must not be modified by your application. Apple might reject your app for it. Documentation

Wolverine
  • 4,264
  • 1
  • 27
  • 49
  • Possible Duplicate ***Question & Answer*** http://stackoverflow.com/q/4872565/1059705 – Bala Nov 15 '12 at 12:01