功能|使用UIActivityViewController分享时,限制分享

【功能|使用UIActivityViewController分享时,限制分享】 let shareImage = UIImage.init(named: "qrcode")
let items = [shareImage!]
let activeVC = UIActivityViewController.init(activityItems: items,applicationActivities: [UIActivity.init()])
//设置可以分享的种类
activeVC.excludedActivityTypes = [UIActivityType.postToFacebook, UIActivityType.postToWeibo, .airDrop, .addToReadingList, .assignToContact, .mail, .message, .postToTencentWeibo]
present(activeVC, animated:true, completion: nil)

    推荐阅读