qlpreviewcontroller

Loading Microsoft Office documents in WKWebView

戏子无情 提交于 2020-07-09 16:31:41
问题 I have been using UIWebView to display Microsoft Office documents (Word, PowerPoint, Excel) in my application for a while but Apple has recently deprecated the UIWebView class. I am trying to switch to WKWebView but Word, Excel, and Powerpoint documents are not rendering properly in WKWebView. Using UIWebView to display an Excel document (worked great): let data: Data //data is assigned bytes of Excel file let webView = UIWebView() webView.load(data, mimeType: "application/vnd.openxmlformats

Loading Microsoft Office documents in WKWebView

a 夏天 提交于 2020-07-09 16:26:07
问题 I have been using UIWebView to display Microsoft Office documents (Word, PowerPoint, Excel) in my application for a while but Apple has recently deprecated the UIWebView class. I am trying to switch to WKWebView but Word, Excel, and Powerpoint documents are not rendering properly in WKWebView. Using UIWebView to display an Excel document (worked great): let data: Data //data is assigned bytes of Excel file let webView = UIWebView() webView.load(data, mimeType: "application/vnd.openxmlformats

How to Disable QLPreviewController print Button

橙三吉。 提交于 2020-01-20 04:08:50
问题 Can anyone tell me how to remove the QLPreviewController print button? Also would like to disable cut/paste/copy. 回答1: UPDATE: This no longer works in iOS 6. Quick Look runs in another process using XPC. See [here][3] for more details. I don't foresee any way to customize QLPreviewController. The following answer remains for anyone interested for pre-iOS 6. If you want to simply remove the action button you need to subclass QLPreviewController . Then in -viewWillAppear: you need to remove the

Hide right button n QLPreviewController?

时光毁灭记忆、已成空白 提交于 2020-01-14 06:22:07
问题 I am subclassing QLPreviewController in my application and using the following code. QLPreviewControllerSubClass* preview = [[QLPreviewControllerSubClass alloc] init]; [self presentViewController:preview animated:YES completion:^() { // do more stuff here }]; I want to hide the right bar button .Tried -(void)viewDidAppear:(BOOL)animated{ [super viewDidAppear:animated]; [self navigationItem].rightBarButtonItems = nil; } But its not hiding.Any help will be appreciable 回答1: I'm dealing the same

Detect when user opens file in app

我们两清 提交于 2020-01-05 01:32:20
问题 I was reading this documentation on how to preview a file on my iOS app. https://developer.apple.com/library/ios/documentation/FileManagement/Conceptual/DocumentInteraction_TopicsForIOS/Articles/PreviewingandOpeningItems.html#//apple_ref/doc/uid/TP40010410-SW1 Is there any to detect which app did the user choose? Or any way to kno if he actually tapped on any option? My problem: iBooks large file (> 700mb). User chooses preview, then taps on the top right corner and chooses to open on iBooks.

Detect when user opens file in app

你说的曾经没有我的故事 提交于 2020-01-05 01:32:16
问题 I was reading this documentation on how to preview a file on my iOS app. https://developer.apple.com/library/ios/documentation/FileManagement/Conceptual/DocumentInteraction_TopicsForIOS/Articles/PreviewingandOpeningItems.html#//apple_ref/doc/uid/TP40010410-SW1 Is there any to detect which app did the user choose? Or any way to kno if he actually tapped on any option? My problem: iBooks large file (> 700mb). User chooses preview, then taps on the top right corner and chooses to open on iBooks.

Unbalanced calls to begin/end appearance transitions

好久不见. 提交于 2019-12-25 07:36:54
问题 When I am presenting a QLPreviewviewcontrolelr from my Viewcontroller , the runtime warning that appears in the log as Unbalanced calls to begin/end appearance transitions for . Can anyone please suggest me the solution to fix. 回答1: Did you delete main.m file?If you didn't have an application begin,you will get this. 回答2: This is clearly Apple bug. You can wrap preview controller into navigation controller and then present this navigation controller modally. This seems to work fine. Only then

iOS - get document's URL when QLPreviewController is closed

旧时模样 提交于 2019-12-24 14:12:43
问题 I have this code which previews the PDF file: QLPreviewController *previewController=[[QLPreviewController alloc]init]; previewController.delegate=self; previewController.dataSource=self; [self presentModalViewController:previewController animated:YES]; Now, when I close QLPreviewController or previewController this method is called: - (void)previewControllerDidDismiss:(QLPreviewController *)controller { NSLog(@"You closed the document"); } Now, how I can return the document's or Pdf's URL

How to manage memory within a QLPreviewController

大城市里の小女人 提交于 2019-12-24 13:58:43
问题 We are currently using a QLPreviewController to load a collection of PDFs. The size of the collection can range from 16, 95, or even 1600+ PDFs. Due to the data source of the PreviewController containing multiple items we now have the ability to swipe left or right within the preview modal and load the next PDF in the list. This functionality has introduced an issue where a gray screen appears within the controller at various locations within the collection. It may occur on the 3rd item, 50th

Why doc and docx losing style information in iOS?

人走茶凉 提交于 2019-12-24 06:37:40
问题 I wanted to open a docx, doc file in iOS. I tried two ways: 1.Web view 2.QLPreviewController In both the ways I am losing the style information associated with the document. WHy this happens? Is in any way possible to retain the style information. Is there any way we can retain this information? The Style could be: A table in document - displayed with doc format but not with docx format Particular text in the document alone can be hightlighted with a color 回答1: iOS has support for MS Office