I usually use the below code to allow the user to submit feedback on my apps. However for some reason in my OpenGL app the below code has a problem. It opens the email form correctly, however the form is locked - i.e the user can't actually edit the body of the text. Can anybody spot why this is happening ?
MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init];
picker.mailComposeDelegate = self;
[picker setSubject:@"Feedback on Stop That Bomb Free !"];
NSArray *toRecipients = [NSArray arrayWithObject:@"anemail@gmail.com"];
[picker setToRecipients:toRecipients];
// Fill out the email b开发者_如何学Cody text
NSString *emailBody =
[NSString stringWithFormat:@"Hi Martin, I would like to make the following comment : "];
[picker setMessageBody:emailBody isHTML:YES];
picker.navigationBar.barStyle = UIBarStyleBlack;
[inputController presentModalViewController:picker animated:YES];
[picker release];
From reading your code I can find some things you should change:
Replace:
NSString *emailBody = [NSString stringWithFormat:@"Hi Martin, I would like to make the following comment : "];
With:
NSString *emailBody = @"Hi Martin, I would like to make the following comment : ";
As you are not using any formatting; you dont need to call the class method to create the simple string.
The other thing you can change is the fact that you message does not contain HTML.
So you dont need isHTML:YES
.
I have tested this successfully on a sample app.
I imagine the problem is with the view controller presenting the view, rather than the messageUI view.
精彩评论