uidocumentinteraction

How to add uigesturerecognizer to UIDocumentInteractionController Preview?

天大地大妈咪最大 提交于 2020-01-03 02:40:11
问题 Is it possible to add gesture recogniser to UIDocumentInteractionController ? Right now I am not able to add anything on UIDocumentInteractionController preview. Please help how to add gesture recogniser or even a button on top of UIDocumentInteraction controller? 回答1: See the apple documentation for UIDocumentInteractionController here They are also providing an example for add gesture recognizers to UIDocumentInteractionController.. See the link here.. 来源: https://stackoverflow.com

UIDocumentInteractionController remove Actions Menu

烈酒焚心 提交于 2020-01-02 08:34:56
问题 I've been working with the Apple sample code for viewing documents from here: https://developer.apple.com/library/ios/samplecode/DocInteraction/Listings/ReadMe_txt.html I have removed all the bits I don't need and got it working pretty much how I would like it to. The problem is I don't want users to have access to the "Actions" menu on the top right of the Document Controller. This appears every time you select a document from the list: Ideally I would like to remove the button all together,

How can I have UIDocumentInteractionController show Calendar as an option for opening a .ics file?

女生的网名这么多〃 提交于 2020-01-02 07:10:29
问题 I am intercepting a type of URL in the webview I use in my app in order to download the file that it links to instead of just trying to open it in the webview. The link is to a .ics file. So I download that file into the temporary directory and then bring up the file in a UIDocumentInteractionController instance, but Calendar is not shown as one of the apps to open that .ics file in, just Mail, DropBox and "Copy". As you can see in the commented out line in the code below I've tried making

UIActivityViewController vs UIDocumentInteractionController in ios

ぃ、小莉子 提交于 2020-01-01 02:25:07
问题 I just read some articles on UIActivityViewController and UIDocumentInteractionController in iOS, but I am very confused about how to use them because both seem the same. So, when do I use UIActivityViewController or UIDocumentInteractionController ? Is there any difference for Open In... & use UIActivityViewController ? I am very confused about how to use them. Please clarify to me their specific use. 回答1: In short, UIDocumentInteractionController deals with files while

Unbalanced calls to begin/end appearance transitions for <QLRemotePreviewContentController: 0x7d19a000> in UIDocumentInteraction

家住魔仙堡 提交于 2019-12-25 14:58:12
问题 I am trying to load files in device by using UIDocumentInteractionController in a phonegap app. I have done by following. #import <Foundation/Foundation.h> #import <QuickLook/QuickLook.h> @interface FileViewer : UIViewController <UIDocumentInteractionControllerDelegate> @end @implementation FileViewer - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; if (self) { // Custom initialization }

Send bundled PDF to iBooks from within app

杀马特。学长 韩版系。学妹 提交于 2019-12-24 17:49:59
问题 I'm using the following code attached to a button, to attempt to open a PDF file in iBooks, but nothing's happening when I click the button. The method's definitely being called. - (IBAction)openDocs { NSURL *url = [NSURL fileURLWithPath:@"MS.pdf"]; UIDocumentInteractionController *docController = [[UIDocumentInteractionController alloc] init]; docController = [UIDocumentInteractionController interactionControllerWithURL:url]; docController.delegate = self; BOOL isValid = [docController

UIDocumentInteractionController opening pdf in iBooks crashes

[亡魂溺海] 提交于 2019-12-23 03:11:51
问题 I have a test PDF file that I want to open in iBooks through my app. I saved it in my temp directory and I use this code to load it to iBooks: NSURL *targetURL = [NSURL fileURLWithPath:tempFullPath]; NSLog(@"Path is %@", tempFullPath); UIDocumentInteractionController *controller = [UIDocumentInteractionController interactionControllerWithURL:targetURL]; controller.delegate = self; controller.UTI = @"com.adobe.pdf"; [controller presentOpenInMenuFromRect:self.view.bounds inView:self.view

UIDocumentInteractionController disable open in certain apps

[亡魂溺海] 提交于 2019-12-22 08:17:09
问题 I'm currently using a UIDocumentInteractionController for open in functionality. When it opens it shows a list of all apps on the device that can handle that file type. Is there a way to disable my app sending a document to specific apps, even if they support that file type? For example - if I have a PDF file open in my app and iBooks is on the iPad, if I tap the iBooks icon in the UIDocumentInteractionController, I don't want it to send it to the app. Ideally - I see this as building a

Change color of UIDocumentInteractionController nav bar

我怕爱的太早我们不能终老 提交于 2019-12-22 04:06:09
问题 Is there a way to change the tint/background color of UIDocumentInteractionController navigationbar ? 回答1: A cleaner version of @DOOManics implementation: - (UIViewController *)documentInteractionControllerViewControllerForPreview:(UIDocumentInteractionController *)controller { return [self navigationController]; } 回答2: If you put the UIDocumentInteractionController onto a UINavigationController it will automatically take the color its navbar. This is probably your root view navcontroller.

Cannot dismiss email sheet invoked from UIDocumentInteractionController in iOS 8

霸气de小男生 提交于 2019-12-21 04:42:10
问题 I've got a very simple test app which contains nothing but the following code, attached to a UIButton : - (IBAction)buttonUp:(id)sender { // Build file path NSString* filePath = [[NSBundle mainBundle] pathForResource:@"testfile" ofType:@"txt"]; NSURL *url = [NSURL fileURLWithPath:filePath]; m_interactionController = [UIDocumentInteractionController interactionControllerWithURL:url]; [m_interactionController presentOptionsMenuFromRect:CGRectMake(200, 200, 100, 100) inView:[self view] animated