I'm using MFMailComposeViewController for in-app email in my app, but I'm not able to change the title. As default it's showing the subject in the title, but I would like to set the title to be something else. How can I do that?
I've tried:
controller.title = @"Feedback";
but it didn't work.
Here's my code:
- (IBAction)email {
NSArray *array = [[NSArray alloc] initWithObjects:@"[email protected]", nil];
MFMailComposeViewController *controller = [[MFMailComposeViewController alloc] init];
[[controller navigationBar] setTintColor:[UIColor colorWithRed:0.36 green:0.09 blue:0.39 alpha:1.00]];
controller.mailComposeDelegate = self;
controller.title = @"Feedback";
[controller setSubject:@"Long subject"];
[controller setMessageBody:@""
isHTML:NO];
[controller setToRecipients:array];
[self presentModalViewController:controller animated:YES];
[controller release];
[array release];
}
- (void)mailComposeController:(MFMailComposeViewController *)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError *)error {
[self becomeFirstResponder];
[self dismissModalViewControllerAnimated:YES];
}