开发者

iphone MFMailComposeViewController

开发者 https://www.devze.com 2022-12-10 03:28 出处:网络
Is there a way to dismiss the keyboard from MFMailComposeViewController ? If the user rotates the device, I am lo开发者_如何学JAVAading a separate controller without \"send\" or \"cancel\" being press

Is there a way to dismiss the keyboard from MFMailComposeViewController ? If the user rotates the device, I am lo开发者_如何学JAVAading a separate controller without "send" or "cancel" being pressed, and the keyboard is remaining on screen. Is there an way to dismiss the keyboard without "done" or "send" being pressed?


You can find the first responder and ask it to resign active which should dismiss the keyboard.

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

精彩评论

暂无评论...
验证码 换一张
取 消