I\'m getting so frustrated while customizing my app. I\'ve already created and styled almost the whole app, including Navigation bar, toolbar, tabBar etc, but everytime a MF
You need to add necessary frameworks for twitter, facebook.
For email do following :
Add MessageUI.framework to your project
In your .h file
#import
@interface CustomController : UIViewController
In your .m file
- (IBAction)actionEmail:(id)sender
{
NSLog(@"actionEmail Called");
MFMailComposeViewController *mc = [[MFMailComposeViewController alloc] init];
mc.mailComposeDelegate = self;
[self presentViewController:mc animated:YES completion:NULL];
}
- (void) mailComposeController:(MFMailComposeViewController *)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError *)error
{
switch (result)
{
case MFMailComposeResultCancelled:
NSLog(@"Mail cancelled");
break;
case MFMailComposeResultSaved:
NSLog(@"Mail saved");
break;
case MFMailComposeResultSent:
NSLog(@"Mail sent");
break;
case MFMailComposeResultFailed:
NSLog(@"Mail sent failure: %@", [error localizedDescription]);
break;
default:
break;
}
// Close the Mail Interface
[self dismissViewControllerAnimated:YES completion:NULL];
}