I figured it out , it's a bit a handful but its worth it.
First of all, at the ViewController where the action of sending an email should be called, put an NSNotification, like this :
[self dismissViewControllerAnimated:YES completion:^{
[[NSNotificationCenter defaultCenter] postNotificationName:@"email" object:nil];
}];
Later on, when that view disappears, an original view controller will show up, since it was called through a modal view controller, in that one put :
-(void)createEmail{
MFMailComposeViewController * mc = [[MFMailComposeViewController alloc] init];
NSArray *toRecipents = [NSArray arrayWithObject:@"elias@gmail.com"];
mc.mailComposeDelegate = self;
[mc setSubject:_emailSubject];
[mc setMessageBody:_emailMessage isHTML:NO];
[mc setToRecipients:toRecipents];
[self presentViewController:mc animated:YES completion:nil];
}
And, in the viewDidload, add the following line :
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(createEmail)
name:@"email" object:nil];
That way, we are telling the original view controller, in her did load phase, to listen for a notification called email, and when we call it in the Email view controller, the app will know that a triggered notification has been fired, and will search for her following action, which is the delegate of the MFMailComposeViewController.
That way, for any future developer, you will accomplish the designated target