UIDocumentInteractionController / QLPreview with UISplitViewController

Is there a way to use one of these preview controls with a detailed view of the UISplitViewController.

I am trying to view application documents and make part of the file browser. But the other part is still eluding me.

No matter what I did to show the preview in the detail view on the SplitViewController, the crash ended. could you help me? How can I achieve this functionality?

+4
source share
1 answer

I did this by installing the detail view controller built into the uinavigation controller. After creating the QLPreviewController, I just clicked the view controller on the navigation controller.

In the detail view controller:

QLPreviewController *previewController = [[QLPreviewController alloc] init]; [previewController setDataSource:self]; [previewController setDelegate:self]; [self.previewItem setTitle:item.name]; [self.navigationController pushViewController:previewController animated:NO]; 

Detail view controller also uses QLPreviewControllerDelegate

 - (NSInteger)numberOfPreviewItemsInPreviewController:(QLPreviewController *)controller { return 1; } - (id<QLPreviewItem>)previewController:(QLPreviewController *)controller previewItemAtIndex:(NSInteger)index { return self.previewItem; } 
+3
source

All Articles