如何使用UIbarbuttonitem发送电子邮件,而不使用MFMailComposerViewController [英] how to send email using UIbarbuttonitem without using MFMailComposerViewController

查看:149
本文介绍了如何使用UIbarbuttonitem发送电子邮件,而不使用MFMailComposerViewController的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用rightBarButtonItem发送电子邮件,而不使用MFMailComposerViewController。
是否可以使用barButtonItem发送电子邮件?



任何想法如何做?



解决方案

您将在接受的答复中找到一个梦幻般的代码示例,发送后台电子邮件:



锁定MFMailComposeViewController中的字段



所有您需要做的是设置rightBarButtonItem的目标,以触发包含此电子邮件代码的方法,然后使用您要发送的信息填充消息内容等。 / p>

希望这有帮助!


I want to send email using rightBarButtonItem without using MFMailComposerViewController. Is It possible to send email using barButtonItem?

Any Idea how to do this?

thanx in advance.

解决方案

You'll find a fantastic code sample on the accepted answer here to send a background email:

Locking the Fields in MFMailComposeViewController

All you need to do is setup your rightBarButtonItem's target to fire a method containing this email code, and then populate the message contents etc using the information you want to send.

Hope this helps!

这篇关于如何使用UIbarbuttonitem发送电子邮件,而不使用MFMailComposerViewController的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆