如何使用Swfit在ios上启动电子邮件客户端 [英] How can I launch an email client on ios using Swfit
本文介绍了如何使用Swfit在ios上启动电子邮件客户端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在Android中,我可以使用其Intent机制从我的Android应用程序启动电子邮件客户端。
在ios中,如何使用Swift从我的ios应用程序启动其电子邮件客户端?
In Android, I can launch an email client from my android application using its Intent mechanism. In ios, how can I launch its email client from my ios application using Swift?
谢谢。
推荐答案
let url = NSURL(string: "mailto:jon.doe@mail.com")
UIApplication.sharedApplication().openURL(url)
请注意,这仅适用于设备,而不适用于模拟器。
Note that this works only on a device, not in the simulator.
这篇关于如何使用Swfit在ios上启动电子邮件客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文