Created
October 26, 2011 10:35
-
-
Save mladjan/1315995 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(IBAction)sendEmail{ | |
MFMailComposeViewController *controller = [[MFMailComposeViewController alloc] init]; | |
controller.mailComposeDelegate = self; | |
recipients = [[NSArray alloc] initWithObjects:@"[email protected]", nil]; | |
[controller setToRecipients:recipients]; | |
[controller setSubject:@"Application meilleurtaux.com – Suggestion."]; | |
[controller setMessageBody:@"" isHTML:NO]; | |
[self presentModalViewController:controller animated:YES]; | |
[[controller navigationBar] setTintColor:[UIColor colorWithRed:237.0f/255.0f green:152.0f/255.0f blue:51.0f/255.0f alpha:1.0f]]; | |
UIImage *image = [UIImage imageNamed: @"MTheaderHeight42.png"]; | |
UIImageView * iv = [[UIImageView alloc] initWithFrame:CGRectMake(0,0,320,42)]; | |
iv.image = image; | |
iv.contentMode = UIViewContentModeCenter; | |
[[[controller viewControllers] lastObject] navigationItem].titleView = iv; | |
[[controller navigationBar] sendSubviewToBack:iv]; | |
[iv release]; | |
[controller release]; | |
} | |
- (void)mailComposeController:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error { | |
[self becomeFirstResponder]; | |
[self dismissModalViewControllerAnimated:YES]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment