Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 12-04-2009, 07:50 PM   #2 (permalink)
ff10
Registered Member
 
Join Date: Oct 2009
Posts: 62
Default

Hi Kenny,

check the documentation for

MFMailComposeViewControllerDelegate

The MailComposeView will automatically integrate the user's address book and will not cause the application to quit.

Of course, your view class must conform to the MFMailComposeViewControllerDelegate. Then create a composer object

Code:
MFMailComposeViewController *sendEmailComposer = [[MFMailComposeViewController alloc] init];
and add predefined text and other options with the following code:

Code:
sendEmailComposer.mailComposeDelegate = self;
[sendEmailComposer setSubject:@"Check this out dude!"];
NSString *emailBody = @"Hi buddy, check this app out in the app store ...";
[sendEmailComposer setMessageBody:emailBody isHTML:NO];
[self presentModalViewController:sendEmailComposer animated:YES];

Don't forget to implement the mailComposeController: delegate method when the user dismisses the composer:

Code:
- (void)mailComposeController:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error 
{    
	[self dismissModalViewControllerAnimated:YES];
}
ff10 is offline   Reply With Quote
 

» Advertisements
» Online Users: 265
15 members and 250 guests
ADY, ckgni, her-ur, ilmman, imehl, iph_s, Jérémie_K., karunaskj, MarkC, marshusensei, mer10, peterkessler45, Rudy, Speed
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,877
Threads: 89,218
Posts: 380,696
Top Poster: BrianSlick (7,129)
Welcome to our newest member, peterkessler45
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 08:33 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.