简体   繁体   English

在iOS中将图像从应用程序共享到其他应用程序

[英]sharing Image from App to other app in ios

How to share an image from my app to other app? 如何从我的应用程序共享图像到其他应用程序?
I have a button in my UIViewController and when it is clicked it should show other app available for sharing 我的UIViewController有一个按钮,单击它应显示其他可共享的应用程序

  1. how can I show a pop up showing all the apps available? 如何显示一个弹出窗口,显示所有可用的应用程序?
  2. how can I share it with flicker app? 如何与闪烁的应用共享?

Try this code 试试这个代码

let activityItem: [AnyObject] = [self.imageView.image as! AnyObject]

let avc = UIActivityViewController(activityItems: activityItem as [AnyObject], applicationActivities: nil)

self.presentViewController(avc, animated: true, completion: nil)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM