3

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

BenMorel
  • 31,815
  • 47
  • 169
  • 296
Nijil Nair
  • 1,598
  • 1
  • 10
  • 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,234
  • 1
  • 24
  • 48
  • Possible Duplicate ***Question & Answer*** http://stackoverflow.com/q/4872565/1059705 – Bala Nov 15 '12 at 12:01