在 MFMailComposeViewController 中查看 CSV 附件
我有一个应用程序,它生成 csv 文件,然后使用 MFMailComposeViewController 将其附加到电子邮件。这一切都很好。
我的问题是我想添加一个选项来在发送之前查看 csv 的内容。 Mail 中存在此功能,其中附加的 csv 可以显示为电子表格。我的问题是:我可以以某种方式访问此功能来显示文件,还是必须诉诸低级核心图形编码来生成电子表格?
I have an application which generates a csv-file and then attaches it to an email using MFMailComposeViewController. This all works fine.
My problem is that I would like to add an option to view the contents of the csv before sending it. This functionality exists in Mail, where an attached csv can be displayed as a spreadsheet. My question is: can I access this functionality somehow to display the file, or do I have to resort to low level Core Graphics coding to generate the spreadsheet?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否尝试过在 UIWebView 中加载 CSV 文件?您无法以编程方式与 MFMailComposeViewController UI 进行交互,因此您必须在显示邮件撰写界面之前尝试此操作。但由于 UIWebView 可以显示各种支持的文件格式,也许它也可以理解 CSV。
Have you tried loading the CSV file in a UIWebView? You can't interact programmatically with the MFMailComposeViewController UI, so you would have to try this before you display the mail compose interface. But since UIWebView can display all sorts of supported file formats, perhaps it understands CSV as well.
我相信您必须自己创建一个 CSV 文件查看器。我不知道有任何现有控制器或视图可以将 CSV 文件转换为电子表格视图。
-t
I believe you will have to create a CSV file viewer yourself. I don't know of any of the existing controllers or views that will turn a CSV file into a spreadsheet view for you.
-t