uiactivityviewcontroller

How to disable “Save To Files” in iOS 11?

∥☆過路亽.° 提交于 2021-02-07 14:20:36
问题 I have an iOS app which creates a PDF and is shared using the UIActivityViewController using the default share functionality. I had to block a few sharing facilities like Vimeo, Facebook, Twillio, etc. and also the file should not be stored on the device. With the new iOS 11 version, Apple has provided SaveToFiles option with the default share functionality. I tried using excludedActivityTypes, and with blocking the "com.apple.CloudDocsUI.AddToiCloudDrive" option, but no success. Can anyone

Share ringtone to Garageband via UIActivityViewController

拥有回忆 提交于 2020-11-29 03:01:30
问题 I am implementing an ringtone application and I would like to share the audio file to GarageBand to let users continue the process, Here is the code on how I share the media fileprivate func shareMedia(url: URL) { let activityViewController:UIActivityViewController = UIActivityViewController(activityItems: [url], applicationActivities: nil) activityViewController.popoverPresentationController?.sourceView = saveAsRingtone activityViewController.popoverPresentationController?.sourceRect =

Share ringtone to Garageband via UIActivityViewController

僤鯓⒐⒋嵵緔 提交于 2020-11-29 03:00:46
问题 I am implementing an ringtone application and I would like to share the audio file to GarageBand to let users continue the process, Here is the code on how I share the media fileprivate func shareMedia(url: URL) { let activityViewController:UIActivityViewController = UIActivityViewController(activityItems: [url], applicationActivities: nil) activityViewController.popoverPresentationController?.sourceView = saveAsRingtone activityViewController.popoverPresentationController?.sourceRect =

Share ringtone to Garageband via UIActivityViewController

霸气de小男生 提交于 2020-11-29 02:59:42
问题 I am implementing an ringtone application and I would like to share the audio file to GarageBand to let users continue the process, Here is the code on how I share the media fileprivate func shareMedia(url: URL) { let activityViewController:UIActivityViewController = UIActivityViewController(activityItems: [url], applicationActivities: nil) activityViewController.popoverPresentationController?.sourceView = saveAsRingtone activityViewController.popoverPresentationController?.sourceRect =

Wrong text color in buttons when sharing with WhatsApp via UIActivityViewController

萝らか妹 提交于 2020-08-05 18:45:50
问题 When I share an text to WhatsApp with the UIActivityViewController the second screen of the sharing, for my case, has the wrong button colors. The first screen is OK. This issue has been discussed a lot of times and one great bucket of answers can be found here: Cannot set text color of Send and Cancel buttons in the mail composer when presented from the UIActivityViewController in iOS7 The answer fixes for me the button colors of: MFMailComposeViewController And the first screen when sharing

Wrong text color in buttons when sharing with WhatsApp via UIActivityViewController

我只是一个虾纸丫 提交于 2020-08-05 18:45:10
问题 When I share an text to WhatsApp with the UIActivityViewController the second screen of the sharing, for my case, has the wrong button colors. The first screen is OK. This issue has been discussed a lot of times and one great bucket of answers can be found here: Cannot set text color of Send and Cancel buttons in the mail composer when presented from the UIActivityViewController in iOS7 The answer fixes for me the button colors of: MFMailComposeViewController And the first screen when sharing

How to share both Image and Text together in swift?

感情迁移 提交于 2020-07-17 09:33:26
问题 I am trying to share both image and text in swift. but when i choose to share via facebook, messenger or whatsapp it only gives text (image is not shared). I am using UIActivityViewController for sharing. here is my code: func displayShareSheet(latitude:NSString?, longitude:NSString?, image:UIImage?, address:NSString? ) { let activityViewController = UIActivityViewController(activityItems: [(latitude as NSString?)!, (longitude as NSString?)!, (image as UIImage?)!, (address as NSString?)!],

iOS 13 UIActivityViewController automatically present previous VC after image saving

落爺英雄遲暮 提交于 2020-07-17 03:22:20
问题 I'm trying to implement “Save image to Library” function and then return back to the current view controller, but on a new iOS 13 it dismisses back to the view controller that presented the current one: PHPhotoLibrary.requestAuthorization({(_ status: PHAuthorizationStatus) -> Void in }) let shareItems: Array = [newImg,"Hello"] as [Any] let activityController = UIActivityViewController(activityItems: shareItems, applicationActivities: nil) if UIDevice.current.userInterfaceIdiom == .pad {

iOS 13, Custom Image, title and subtitle in the presented UIActivityViewController

我们两清 提交于 2020-06-27 03:48:12
问题 I would like to know if there is any way to customise the image, title and subtitle of presented UIActivityViewController in iOS 13? 回答1: I have found a solution using UIActivityItemSource UIActivityItemSource have this protocol activityViewControllerLinkMetadata(_ activityViewController: UIActivityViewController) -> LPLinkMetadata? which we can use to set image title and subtitle for our UIActivityViewController This is an example: public func activityViewControllerLinkMetadata(_

iOS 13, Custom Image, title and subtitle in the presented UIActivityViewController

妖精的绣舞 提交于 2020-06-27 03:48:08
问题 I would like to know if there is any way to customise the image, title and subtitle of presented UIActivityViewController in iOS 13? 回答1: I have found a solution using UIActivityItemSource UIActivityItemSource have this protocol activityViewControllerLinkMetadata(_ activityViewController: UIActivityViewController) -> LPLinkMetadata? which we can use to set image title and subtitle for our UIActivityViewController This is an example: public func activityViewControllerLinkMetadata(_