开发者

iPhone MFMAilComposeViewControllerDelegate problem

I wrote a code that utilizes the MFMAilComposibleViewController to harness in-app emails. I specified the delegate as so under, but my delegate method isn't getting called. This is the first time I'm getting this type of error; I normally develop under the iPhone but for a client I need to develop under an iPad.

MFMailComposeViewController *mailComposer = [[MFMailComposeViewController alloc] init];

[mailComposer setModalPresentationStyle: UIModalPresentationFormSheet];

[mailComposer setSubject: @"Hello World"];

[mailComposer setMailComposeDelegate: self];

[mailComposer setMessageBody: @"<font color='red'>Hello</font> &开发者_如何学编程lt;font color='blue'>World</font>" isHTML:YES];

[self presentModalViewController: mailComposer animated: YES];

This snippet is an exact copy-paste of the method that calls the mailview. Please note, I did specify in my header the MFMailViewControllerDelegate protocol.

Thank You!


Have you tested this in simulator? As i've experienced before, the mail composer doesn't work in the simulator but in the device. Try it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜