问题
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.
回答1:
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.
来源:https://stackoverflow.com/questions/49743016/swift-4-coreplot-send-chart-via-mail-app-with-messageui