开发者

Nothing is editable and no keyboard in MFMailComposeViewController

开发者 https://www.devze.com 2022-12-27 00:12 出处:网络
I\'m launching a MFMailComposeViewController like so: ShareViewController *shareView = [[ShareViewController alloc] initWithSubject:subjectbody:body footer:footer];

I'm launching a MFMailComposeViewController like so:

ShareViewController *shareView = [[ShareViewController alloc] initWithSubject:subject        body:body footer:footer];

shareView.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
shareView.modalPresentationStyle = UIModalPresentationFormSheet;
[self presentModalViewController:shareView animated:YES];    

The init looks this:

- (id)initWithSubject:(NSString *)subject body:(NSString *)body footer:(NSString *)footer{

[super init];

self.navigationBar.barStyle = UIBarStyleBlack;
self.mailComposeDelegate = self;

[self setSubject:subject];    

body = [NSString stringWithFormat:@"%@ %@", body, footer];

[self setMessageBody:body isHTML:YES]; 

return self;
}

The email window appears, and I can move the cursor around the body of the email. But I am not able to bring up a keyboard, or move the cursor to the To:, CC:, or Subject: fields at all. No idea what's going on. This was previously working but I've recently made several UI changes. 'Cancel' dismisses the modal as expected. 'Send' is not enabled since there's no recipient in the To开发者_JAVA技巧: field.

Any ideas?


Turns out I had forgotten to call [super viewDidAppear] when I overrode viewDidAppear.

0

精彩评论

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