uidocumentinteraction

iOS 6 sharing like Messages, not like Photos (UIActivityViewController and UIDocumentInteractionController)

こ雲淡風輕ζ 提交于 2019-12-07 06:09:06
问题 In iOS 6, tapping the action button in the Photos app presents the standard UIActivityViewController: Doing the same from Messages presents a different set of options. This looks to me like it's using the UIDocumentInteractionController api to pull all the apps that say they can handle an image. My question is twofold: How does one get into the Messages action menu? Tumblr and Halftone, to name a few, have done it... I can't seem to find the documentation. How does one show the Messages-style

Document interaction controller with iOS 7 status bar?

a 夏天 提交于 2019-12-07 02:54:46
问题 The UIDocumentInteractionController seems to have trouble interacting properly with the new iOS 7 status bar particularly in landscape orientation. The code I have for displaying the viewer right now: - (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; NSString *filePath = [[NSBundle mainBundle] pathForResource:@"example" ofType:@"pdf"]; NSURL *url = [NSURL fileURLWithPath:filePath]; UIDocumentInteractionController *pdfViewer = [UIDocumentInteractionController

Whatsapp Image sharing not working

吃可爱长大的小学妹 提交于 2019-12-06 15:30:35
My class implements the UIDocumentInteractionControllerDelegate and I have the following property: @property (nonatomic,retain) UIDocumentInteractionController * documentInteractionController; if ([[UIApplication sharedApplication] canOpenURL: [NSURL URLWithString:@"whatsapp://app"]]) { UIImage *iconImage = [UIImage imageNamed:@"bg_iPhone_5.jpg"]; NSString *savePath = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/whatsAppTmp.wai"]; [UIImageJPEGRepresentation(iconImage, 1.0) writeToFile:savePath atomically:YES]; _documentInteractionController = [UIDocumentInteractionController

How to add uigesturerecognizer to UIDocumentInteractionController Preview?

爱⌒轻易说出口 提交于 2019-12-06 14:56:31
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? 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/questions/20604212/how-to-add-uigesturerecognizer-to-uidocumentinteractioncontroller-preview

UIDocumentInteractionController remove Actions Menu

落花浮王杯 提交于 2019-12-06 00:15:50
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, though if I could disable it or disable all the options inside it that would also suffice. I found

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

杀马特。学长 韩版系。学妹 提交于 2019-12-05 22:45:02
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 the link open with webcal:// at the front instead of http://, and also manually setting the

How to Share PDF file in all eligable and appear iOS app?

孤人 提交于 2019-12-05 22:40:36
I am using UIActivityViewController for sharing PDF file, I have applied all code successfully to share .Pdf file, and when I see sharing sheet option there I can share or send my PDF file like Facebook, Gmail, Print, Copy etc but in my iPhone there some app also where we can share PDF file like WeChat, Open in iBooks, open in Hike, open in chrome etc but these option not shown on my share list like this image. But when I use UIDocumentInteractionController then I saw all sharing option Facebook, Gmail, Wechat, open in iBooks, open in hike etc. All apps which support pdf shown as sharing

UIDocumentInteractionController Open Menu Cancelled Callback

白昼怎懂夜的黑 提交于 2019-12-05 22:03:03
问题 I am currently developing an application specifically for iOS7 that utilizes UIDocumentInteractionController open in menu and need a method that notifies me when a user cancels and does not choose an available option. UIDocumentInteractionControllerDelegate offers: - (void)documentInteractionControllerDidDismissOptionsMenu:(UIDocumentInteractionController *) controller but this does not specify whether the user tapped one of the available options or cancel. Any ideas? 回答1: NOTE: This will not

iOS Swift - Share on Instagram with captions

假如想象 提交于 2019-12-05 18:37:31
问题 I am able to successfully share an image on Instagram using the UIDocumentInteractionController , but the InstagramCaption key won't work. This is my code: self.controller = UIDocumentInteractionController() // controller.delegate = self self.controller.URL = fileUri // HERE, the caption won't appear. self.controller.annotation = NSDictionary(objectsAndKeys: "my caption", "InstagramCaption") self.controller.UTI = "com.instagram.exclusivegram" self.controller.presentOpenInMenuFromRect

UIDocumentsInteractionController shows iBooks but doesn't open it

只愿长相守 提交于 2019-12-05 14:15:58
My UIDocumentsInteractionController is working as far as presenting an action sheet with a button that says "iBooks" but when I click on that button, it just dismisses and it doesn't take me to iBooks. Here's my code: NSString *filenamePath =[NSString stringWithFormat:@"temp.%@", [[file path] pathExtension]]; NSString *docDir = [DataCenter getDocumentsDirectoryPath]; NSString *fullPath = [docDir stringByAppendingPathComponent:filenamePath]; NSURL *url = [NSURL fileURLWithPath:fullPath]; UIDocumentInteractionController *c = [UIDocumentInteractionController interactionControllerWithURL:url];