SLComposeViewController具有屏幕截图但不包含图像附件 [英] SLComposeViewController with screenshot but not image attachment

查看:154
本文介绍了SLComposeViewController具有屏幕截图但不包含图像附件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我注意到Mobile Safari的Twitter和Facebook共享添加了当前页面的屏幕截图而没有实际共享它,例如:






我试图通过SLComposeViewController复制它,但是调用)这样你就可以在这里添加你自己的预览,也许Apple将在未来的iOS版本中公开。


I notice that Mobile Safari's Twitter and Facebook share adds a screenshot of the current page without actually sharing it, eg:

Im trying to duplicate this via SLComposeViewController, however calling the addImage: actually adds the UIImage to the tweet/facebook album (as expected).

Is there a way to just display the screenshot of the page without adding the image ?

Edit: Looks like SLComposeViewController conforms to UIAppearanceContainer however the UI_APPEARANCE_SELECTOR is not documented.

解决方案

Safari is previewing the screenshot to the website because it has it loaded and ready in on the screen, when you addURL: on the SLComposeViewController it doesn't resolve that URL and grab a preview.

Also when you addImage: that's exactly what it's doing, it's adding an image to your post, this isn't what you want, you just want to have a visual and not a safari logo/icon in place of the attachment indicating a link.

I can only say there is a private method on the SLComposeViewController class which is how Safari is adding a preview image for URLs added...

You should always get this in your app when sharing a URL:

That sucks, you should add a feature request (http://bugreport.apple.com) so that you can add your own preview here, maybe Apple will make that public in future iOS releases.

这篇关于SLComposeViewController具有屏幕截图但不包含图像附件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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