UIActivityView 控制器行为很奇怪

编程入门 行业动态 更新时间:2024-10-26 05:16:49
本文介绍了UIActivityView 控制器行为很奇怪的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用 UIActivityViewController 在我的应用程序中添加共享功能,但我做了很多研究,发现例如在 IOS7 和 IOS8 中,如果用户尚未登录或在设置中添加帐户,则 UIActivityViewController 将不会加载 twitter 的图标和Facebook 等.我见过一个名为 MusiXMatch 的应用程序,他们使用了歌曲共享模块上的共享功能.他们显示 Facebook 和 twitter 图标,而没有在设置中添加帐户.我想知道这是怎么发生的.看起来它看起来像默认的 UIActivityViewController 但是我在研究中发现我的 UIActivityViewController 除了登录帐户之外没有得到图标.这个应用程序给了我很多惊喜.我必须这样做.我已经通过使用 OWActivityViewController 完成了这个想法,但它是 IOS6 布局.我需要将其设为默认的 IOS7 和 IOS8.需要尽快解决.非常感谢.

I need to add share functionality in my app with UIActivityViewController but I have done a lot of research and found that e.g in IOS7 and IOS8 if user has not logined or added account in settings then UIActivityViewController will not load the icons of twitter and Facebook etc. I have seen an app named MusiXMatch they have used the sharing on there songs share module.They are showing Facebook and twitter icons without adding the accounts in settings. I am wondering how this is happening. It seems that it looks likes the default UIActivityViewController but what I have found in my research my UIActivityViewController did not get the icons except login into accounts. This app surprise me a lot. I have to make like this. I have done this think by using OWActivityViewController but it is IOS6 layout. I need to make it as default IOS7 and IOS8. Need solution asap. Thanks a lot.

推荐答案

您可以实现自己的 UIActivityType 并要求用户在发布给他们之前登录到所需的应用程序(Facebook、Twitter 等),但您需要构建整个活动来处理通信.您或许可以从 OWAActivityViewController 中提取代码并重新使用它.

You can implement your own UIActivityType and ask the user to login to the desired app (Facebook, Twitter, etc.) before posting to them but you would need to build the whole activity to handle the communication. You might be able to extract the code from OWAActivityViewController and re-use it.

这篇关于UIActivityView 控制器行为很奇怪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-03-31 16:40:18,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/808874.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:很奇怪   控制器   UIActivityView

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!