UIActivityViewController与HTML [英] UIActivityViewController with HTML
问题描述
当我将包含HTML内容的字符串作为数组元素传递给 UIActivityViewController initWithActivityItems
方法时,它不会在选定的'share'控制器中将其显示为HTML,但而是提供HTML源代码(即标记而不是解释它)。
虽然我可以理解为什么它会对不支持html内容的共享目标执行此操作,它不会将它解释为电子邮件,也不会这样做(以前这可以通过将 我应该浪费时间创建一个>
属性设置为 YES $
会根据'activity type'返回自定义内容,或者真的没有办法让
MFMailComposeController
)。 UIActivityViewController
提供的邮件控制器来解释内容为HTML?
您期待什么样的活动? upport?活动类型取决于服务,而且它们很漂亮
您总能以老式的方式做事,并将纯文本和HTML复制到粘贴板,或者直接调用邮件编辑器,或者任何你想要完成的任务。
When I pass a string containing HTML content as an array element to the UIActivityViewController initWithActivityItems
method it doesn't present it as HTML in the selected 'share' controller, but instead presents the HTML source (i.e. the markup rather than interpreting it).
And while I can understand why it would do this for share targets that don't support html content, it won't interpret it for things like email either, which do (previously this would be done by setting the isHTML
property to YES
on the MFMailComposeController
).
Should I waste my time creating a UIActivityItemProvider
that returns custom content based on the 'activity type' or is there really no way to get the mail controller presented by the UIActivityViewController
to interpret the content as HTML?
What activities are you looking to support? Activity types are dependent on the service, and they're pretty clearly defined. There's no way for services to know that a string is a plain text or marked-up text, for example--you might want to paste HTML code on purpose.
You can always do things the old-fashioned way and copy plain text and HTML to the pasteboard, or call the mail composer directly, or whatever you're trying to accomplish.
这篇关于UIActivityViewController与HTML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!