我想从UIActivity Controller中删除保存视频选项 我可以使用排除[.saveToCameraRoll]选项删除保存图像选项。
这是一个快照
我已在localpath中保存视频,&当我从该路径分享该视频时,UIActivity Controller会显示" Save Video"选项。
我必须删除这个.coz苹果因为这个原因拒绝我的应用程序。
let activityViewController = UIActivityViewController(activityItems: [media as Any], applicationActivities: nil)
activityViewController.popoverPresentationController!.sourceView = self
activityViewController.excludedActivityTypes = [.saveToCameraRoll]
activityViewController.completionWithItemsHandler = { activity, success, items, error in
print("activity: \(activity), success: \(success), items: \(items), error: \(error)")
if success
{
if AppUtility.getAppDelegate().defaultpoints != 0 {
_ = self.getFinalRewardPoints(curentpoints: AppUtility.getAppDelegate().defaultpoints!, restPoint: Double(RewardedPoints.sharedatapoint))
}
}
}
if let controller : MyCollectionControler = self.getViewControllerFromSubView() as? MyCollectionControler
{
controller.present(activityViewController, animated: true, completion: nil)
}
}
答案 0 :(得分:1)
试试这个
let activityController = UIActivityViewController(activityItems: sharingItems, applicationActivities: nil)
activityController.excludedActivityTypes = [
UIActivityType.assignToContact,
UIActivityType.print,
UIActivityType.addToReadingList,
UIActivityType.saveToCameraRoll,
UIActivityType.openInIBooks,
UIActivityType(rawValue: "com.apple.reminders.RemindersEditorExtension"),
UIActivityType(rawValue: "com.apple.mobilenotes.SharingExtension"),
]
present(activityController, animated: true, completion: nil)
答案 1 :(得分:0)
请分享您的代码和iOS版本,因为我没有获得保存视频标签。
UIActivityViewController *activityVc = [[UIActivityViewController alloc]initWithActivityItems:@[@"Test Str",@"Test Str"] applicationActivities:nil];
[self.navigationController presentViewController:activityVc animated:true completion:nil];