i hav a button on navigation bar for opening the mail view controller .. i am using view based app and when i tap the button its executes the ibaction i wrote but not presenting the view ....
-(IBAction)mailid:(id)sender{
MFMailComposeViewController *controller = [[MFMailComposeViewController alloc] init];
controller.mailComposeDelegate = self;
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *path = [documentsDirectory stringByAppendingPathComponent:@"Report.html"];
NSData *myData = [NSData dataWithContentsOfFile:path];
[controller addAttachmentData:myData mimeType:@"html" fileName:@"Attachment-1"];
[self presentModalViewController:controller animated:YES];
[controller release];
}
any help ....