views:

204

answers:

1

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: field.

Any ideas?

A: 

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

tuzzolotron