uidocumentinteraction

Can I hide the Action button on the UIDocumentInteractionController view?

折月煮酒 提交于 2019-12-01 09:06:42
I wanted to know if I can hide the Action button on the UIDocumentInteractionController so a user couldn't actually open the document in another app? I found something that works for me well enough: - (BOOL)documentInteractionController:(UIDocumentInteractionController *)controller canPerformAction:(SEL)action{ return false; } It still shows the button but the popover that appears only has the print form but the print button is disabled. The whole purpose of the UIDocumentInteractionController is to show the user which applications can handle a file and give them a way to 'send' the file to

How do I share an Audio File in an App using Swift 3?

强颜欢笑 提交于 2019-12-01 07:42:21
问题 Sharing an Audio File in Swift How do I share an audio file which exists in my apps document directory to other apps? To elaborate on this question, what I mean is when a user taps a share button in the app they should be able to email their recorded audio track to another person, or alternatively to be able to send it across to a range of other apps which can handle audio like perhaps soundcloud. Researching the topic, I have found: UIActivityViewController UIDocumentInteractionController

UIDocumentInteractionController Does Not Show Mail Option

这一生的挚爱 提交于 2019-12-01 04:27:22
Heres the UIDocuemtnInteractionController from my application(does not show mail option) Here the one that Apples sample project uses Here are the respective codes My application docInteractionController = [UIDocumentInteractionController interactionControllerWithURL:fileURL]; [docInteractionController presentOpenInMenuFromBarButtonItem:(UIBarButtonItem*)sender animated:YES]; Apple Sample Project NSURL *fileURL; if (cellIndexPath.section == 0) { // for section 0, we preview the docs built into our app fileURL = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:documents

UIDocumentInteractionController Does Not Show Mail Option

五迷三道 提交于 2019-12-01 02:43:54
问题 Heres the UIDocuemtnInteractionController from my application(does not show mail option) Here the one that Apples sample project uses Here are the respective codes My application docInteractionController = [UIDocumentInteractionController interactionControllerWithURL:fileURL]; [docInteractionController presentOpenInMenuFromBarButtonItem:(UIBarButtonItem*)sender animated:YES]; Apple Sample Project NSURL *fileURL; if (cellIndexPath.section == 0) { // for section 0, we preview the docs built

Opening a file by UIDocumentInteractionController

跟風遠走 提交于 2019-11-30 22:13:52
I am using UIDocumentInteractionController for opening documents in my app. I have used method below for previewing the PDF file:- - (IBAction)previewDocument:(id)sender { NSString *filePath = [[NSBundle mainBundle] pathForResource:@"sample" ofType:@"pdf"]; // Initialize Document Interaction Controller self.documentInteractionController = [UIDocumentInteractionController interactionControllerWithURL:[NSURL fileURLWithPath:filePath]]; // Configure Document Interaction Controller [self.documentInteractionController setDelegate:self]; // Preview PDF [self.documentInteractionController

Opening a file by UIDocumentInteractionController

隐身守侯 提交于 2019-11-30 17:23:26
问题 I am using UIDocumentInteractionController for opening documents in my app. I have used method below for previewing the PDF file:- - (IBAction)previewDocument:(id)sender { NSString *filePath = [[NSBundle mainBundle] pathForResource:@"sample" ofType:@"pdf"]; // Initialize Document Interaction Controller self.documentInteractionController = [UIDocumentInteractionController interactionControllerWithURL:[NSURL fileURLWithPath:filePath]]; // Configure Document Interaction Controller [self

Sharing image to Whatsapp & Facebook

守給你的承諾、 提交于 2019-11-30 12:10:33
问题 I'm already able to share photos to Whatsapp but the way I do this is by providing Whatsapp option in a UIActivityViewController and then showing a UIDocumentInteractionController . From this UIDocumentInteractionController , I choose the Whatsapp option which redirects the user to Whatsapp and enables him to share the photo. So far my code is like this: if ([activityType isEqualToString:@"whatsappSharing"]) { if ([[UIApplication sharedApplication] canOpenURL: [NSURL URLWithString:@"whatsapp:

How do I save additional content into my UIManagedDocument file packages?

佐手、 提交于 2019-11-30 10:51:59
问题 I'm having a lot of trouble deciphering Apple's documentation around UIManagedDocument, specifically the following methods: - (id)additionalContentForURL:(NSURL *)absoluteURL error:(NSError **)error - (BOOL)readAdditionalContentFromURL:(NSURL *)absoluteURL error:(NSError **)error - (BOOL)writeAdditionalContent:(id)content toURL:(NSURL *)absoluteURL originalContentsURL:(NSURL *)absoluteOriginalContentsURL error:(NSError **)error Has anyone successfully managed to save additional content into

Sharing image to Whatsapp & Facebook

末鹿安然 提交于 2019-11-30 02:07:38
I'm already able to share photos to Whatsapp but the way I do this is by providing Whatsapp option in a UIActivityViewController and then showing a UIDocumentInteractionController . From this UIDocumentInteractionController , I choose the Whatsapp option which redirects the user to Whatsapp and enables him to share the photo. So far my code is like this: if ([activityType isEqualToString:@"whatsappSharing"]) { if ([[UIApplication sharedApplication] canOpenURL: [NSURL URLWithString:@"whatsapp://app"]]) { NSString *savePath = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents

How do I save additional content into my UIManagedDocument file packages?

我与影子孤独终老i 提交于 2019-11-29 22:40:00
I'm having a lot of trouble deciphering Apple's documentation around UIManagedDocument , specifically the following methods: - (id)additionalContentForURL:(NSURL *)absoluteURL error:(NSError **)error - (BOOL)readAdditionalContentFromURL:(NSURL *)absoluteURL error:(NSError **)error - (BOOL)writeAdditionalContent:(id)content toURL:(NSURL *)absoluteURL originalContentsURL:(NSURL *)absoluteOriginalContentsURL error:(NSError **)error Has anyone successfully managed to save additional content into the "addition content" directory inside their UIManagedDocument packages? I'm looking to save straight