Swift 4,CorePlot,通过邮件应用程序发送图表(带有MessageUI) [英] Swift 4, CorePlot, send chart via mail app (with MessageUI)

查看:148
本文介绍了Swift 4,CorePlot,通过邮件应用程序发送图表(带有MessageUI)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我能否以某种方式将图表(由CorePlot制作)从视图中以文件的形式通过邮件应用程序发送给另一个人?我想借助MessageUI发送邮件。我感觉很好,如果只是图片将被发送。

解决方案

使用 -imageOfLayer 方法获取图形的PNG或 -dataForPDFRepresentationOfLayer 方法来获取PDF并将结果文件附加到消息中。


Can I somehow take the chart (which was made with CorePlot) from view and send it as a file to another person via mail app? I want to send mail with the help of MessageUI. I feel fine if just the picture will be sent.

解决方案

Use the -imageOfLayer method to get a PNG of the graph or the -dataForPDFRepresentationOfLayer method to get a PDF and attach the resulting file to a message.

这篇关于Swift 4,CorePlot,通过邮件应用程序发送图表(带有MessageUI)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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