Objective-C:通过UIDocumentInteractionController将文本和图像分享到Instagram / Facebook / Twitter [英] Objective-C: Share both, Text AND Image via UIDocumentInteractionController to Instagram/Facebook/Twitter

查看:248
本文介绍了Objective-C:通过UIDocumentInteractionController将文本和图像分享到Instagram / Facebook / Twitter的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只想知道是否有办法与UIDocumentInteractionController共享图片和文本。



我开发了一个具有共享功能的应用程序,到目前为止,我可以分享图片到Facebook,Twitter和instagram,但没有文字与图片。



我正在使用UIDocumentInteractionController,否则我无法分享图片通过instagram(例如,不可能使用ActivityViewController)。

解决方案

你不能,UIDocumentInteractionController是文件。一个解决方案是将该字符串保存到文本文件并共享该文件,或者如果要共享一个字符串,例如:发布在社交网络上,您应该使用UIActivityViewController


I just want to know if there is a way to share a picture AND a text with the UIDocumentInteractionController.

I developed an app which has the functionality to share, and so far I can share pictures to facebook, twitter and instagram, but no text with the picture.

I am using the UIDocumentInteractionController because otherwise I couldn't manage to share pictures through instagram (for example it was not possible to do so with the ActivityViewController).

解决方案

You can't, UIDocumentInteractionController is for documents. It is even in the name.

A solution would be to save the string to text file and share that file, or if you want to share a string, for example to post on a social network you should use UIActivityViewController

这篇关于Objective-C:通过UIDocumentInteractionController将文本和图像分享到Instagram / Facebook / Twitter的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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