uidocumentinteraction

UIDocumentInteractionController crashing upon exit

僤鯓⒐⒋嵵緔 提交于 2019-12-19 17:42:57
问题 I have a regular UIButton on my main menu that currently launches a UIViewController; the contents of the corresponding .m file is as follows: -(id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; documentPath = [[NSBundle mainBundle] pathForResource:@"file" ofType:@"pdf"]; NSURL *targetURL = [NSURL fileURLWithPath:documentPath]; document = [UIDocumentInteractionController

Open in + UIDocumentInteractionController : how to filter options in SDK iOS 6 (canPerformActions is deprecated)

岁酱吖の 提交于 2019-12-17 19:33:13
问题 Since the new SDK was release (iOS 6), the delegate method documentInteractionController:canPerformAction: of the UIDocumentInteractionControllerDelegate is deprecated. Using that method you were able to prevent default actions like print: and copy: to appear. The method is being called in the current version of iOS 6, but in future versions this method will not be called and my app will show actions that I don't want to support. I read the available documentation for the

“Expression Result Unused” in UIDocumentInteractionController

半城伤御伤魂 提交于 2019-12-14 02:45:03
问题 Be gentle! I only have a vague understanding of what I am doing. I'm trying to set the Name property of UIDocumentInteractionController with hopes that it will change the file name before it is sent to another application. I'm using the following to accomplish this: UIDocumentInteractionController *documentController; NSString *docDir = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject]; NSURL *soundFileURL = [NSURL fileURLWithPath:[docDir

UIDocumentInteractionController annotation property doesn't copy caption to presented application

删除回忆录丶 提交于 2019-12-13 04:36:12
问题 Thanks to a couple other posts here , I've successfully be able to use the Instagram iPhone hooks to open Instagram and present it with a photo successfully from my application. (I've made my ViewController class a delegate of UIDocumentInteractionController , and alloc/init 'ed a nonatomic/retain property of UIDocumentInteractionController ... However, the key that I put into my NSDictionary that I place in the document controller annotation property will not seem to carry over to Instagram

ios iphone hooks open instagram directly without showing UIDocumentInteractionController

若如初见. 提交于 2019-12-12 07:59:59
问题 I'm integrating sharing images through instagram in my app. I've read their documentation. It seems that I need to use the iOS UIDocumentInteractionController to allow this (I understand that it allows access to files in my app's sandbox). Digging deeper, I came across this library which makes things very straightforward. The problem I have with it is that it presents the action sheet (which only has one button - Instagram...) How can I use the instagram hooks , with the

iOS share image AND text to WhatsApp

孤人 提交于 2019-12-12 07:08:15
问题 I have googled, and get some solutions, it seems the only possible way is thru UIDocumentInteractionController . I have found the result that able to share text ONLY, also found result that share image ONLY. But what I want is share BOTH . I know this question may be duplicated, I just wanted to make it clear, here is the screenshot... (This is shared from Android) 回答1: You can use UIActivityViewController to share image , text or URL .Here is a small example : NSString *textToShare = @"Enter

open PDF URL in iOS 8?

 ̄綄美尐妖づ 提交于 2019-12-12 00:39:39
问题 I have write this code to show pdf using UIDocumentInteractionController.But,I don't know how to search pdf at local directory and open in iOS 8 and below..Any help? let filename = history.invoiceLongDate // 01223642 if !filename.isEmpty{ let paths = NSSearchPathForDirectoriesInDomains(.DocumentDirectory, .UserDomainMask, true) let docs = paths[0] let pathURL = NSURL(fileURLWithPath: docs, isDirectory: true) if #available(iOS 9.0, *) { let fileURL = NSURL(fileURLWithPath: "\(filename)_my

setStatusBarHidden stops working properly after UIDocumentInteractionController's presentPreviewAnimated

十年热恋 提交于 2019-12-11 11:31:39
问题 So my app has the status bar set to be hidden like this in the AppDelegate. And it works as intended. [[UIApplication sharedApplication] setStatusBarHidden:YES]; Then I use UIDocumentInteractionController's presentPreviewAnimated like this,etc.: [self.docInteractionController presentPreviewAnimated:YES]; I observed that the status bar does show up (with battery info etc.) while in this UIDoc's preview mode. But after dismissing the preview and back to the original view, while the status bar

iOS UIDocumentInteractionController LaunchServices: invalidationHandler called

对着背影说爱祢 提交于 2019-12-11 11:15:10
问题 I'm having an issue when I try to Launch Instagram from my app. Everything works and I'm able to launch IG and even see the photo I sent etc. The problem is that the UIDocumentInteractionController is crashing my app. And YES I have done my research. I've seen the posts LIKE THIS that indicate that this is an Apple bug as as long as you can fix the crash, you should be able fine and ignore the Launch Services message. The problem is I am still having the crash and trying to figure out how to

DocumentInteractionController Navigation Bar Color

蹲街弑〆低调 提交于 2019-12-11 03:06:29
问题 In my iOS application, I am using the DocumentInteractionController to preview the .csv document. self.documentController = [UIDocumentInteractionController interactionControllerWithURL:fileLocation]; [self.documentController setDelegate:self]; [self.documentController presentPreviewAnimated:YES]; However, I am finding that the navigation bar is completely transparent. The back button is white, so it is not visible due to the white background. Note that I have styled the navigation bar in the