[英]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
有一个按钮,单击它应显示其他可共享的应用程序
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.