I can’t create MFMailComposeViewController’s object. Can you help me?
I’ve tried 2 methods and it doesn’t work:
MFMailComposeViewController *mf = [MFMailComposeViewController new];
or
MFMailComposeViewController *mf = [[MFMailComposeViewController alloc] init];
Anybody knows what’s happen?
Thanks.
P.S. It doesn’t work on iPad 2 with ios 4.3.3, but it work on iPad 1 with ios 4.3.2
Check to see if
[MFMailComposeViewController canSendMail](documentation linked) returns YES.I suspect it’s not, in your case.
If it does return yes, is “mf” set to null after you do alloc/init ?
Also make sure the MessageUI.framework is added to your project. In case you need it, here’s a tutorial.