来自 UIActivityItemSource 的多个数据 [英] Multiple data from UIActivityItemSource

查看:62
本文介绍了来自 UIActivityItemSource 的多个数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法从 UIActivityItemSource 提供多个对象?例如,我想向 Mail、Facebook 和 Twitter 提供 NSString 和 UIImage,以便它们包含在同一个电子邮件/帖子/推文中.我尝试将对象放入 NSArray 并传递它,但它抛出异常.

Is there any way to provide multiple objects from a UIActivityItemSource? For example, I would like to provide an NSString and UIImage to Mail, Facebook and Twitter so they are included in the same email/post/tweet. I tried putting the objects in an NSArray and passing that, but it threw and exception.

推荐答案

原来我需要做的就是向活动控制器提供多个项目,因为每个活动项目源只能提供一个项目.

Turned out all I needed to do was provide multiple items to the activity controller, since each activity item source can only provide one item.

这篇关于来自 UIActivityItemSource 的多个数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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