I'm trying to set it up so people can email from within my application. I'm referencing this post to do this, but I'm getting these warnings on the build:
and then when I run it, it bugs:
I'm wondering if I've simply placed the code in the wrong area. Just so you know I have placed
#import <MessageUI/MessageUI.h>
in the header file.
Thanks for the help!
EDIT 1
It seems as if the problem lies within how my ViewController is setup. In fact all my UI code is in a separate object as shown below. This is making it difficult for me to understand which code goes where. Any advice?
Add the MessageUI
framework into your framework folder and
import these classes in your viewController.h:-
#import <MessageUI/MessageUI.h>
#import <MessageUI/MFMailComposeViewController.h>
@interface *your controller* : UIViewController <MFMailComposeViewControllerDelegate>
Well it looks like your SpeakHereController isn't a UIViewController.
Therefore it can't find the methods for presenting and dismissing the modalViewController.
Also you need to implement the MFMailComposeViewControllerDelegate
, add it to your viewcontroller.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With