Hallo ,
gibt es eine Möglichkeit den View des QLPreviewController in einen eigen View als Subview anzeigen zu lassen. Standard mässig wird dieser ja als FullScreen/modal angezeigt (wie folg, funktioniert auch):
Alles anzeigen
Diese schicke Vorschau möchte ich jetzt in mein DetailViewController eines UISplitViewControllers anzeigen lassen. Hat jemand damit schon Erfahrungen gemacht ?
Danke für Tipps !
gibt es eine Möglichkeit den View des QLPreviewController in einen eigen View als Subview anzeigen zu lassen. Standard mässig wird dieser ja als FullScreen/modal angezeigt (wie folg, funktioniert auch):
Quellcode
- NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"Test.pages" ofType:nil]];
- if (self.docInteractionController == nil) {
- self.docInteractionController = [UIDocumentInteractionController interactionControllerWithURL:url];
- self.docInteractionController.delegate = self;
- }
- else {
- self.docInteractionController.URL = url;
- }
- NSInteger iconCount = [docInteractionController.icons count];
- if (iconCount > 0) {
- self.icon.image = [docInteractionController.icons objectAtIndex:0];
- }
- // for case 3 we use the QuickLook APIs directly to preview the document -
- QLPreviewController *previewController = [[QLPreviewController alloc] init];
- previewController.dataSource = self;
- previewController.delegate = self;
- if (popoverController != nil) {
- [popoverController dismissPopoverAnimated:YES];
- }
- // start previewing the document at the current section index
- previewController.currentPreviewItemIndex = 0;
- [self presentModalViewController:previewController animated:YES];
- [previewController release];
- ...
- #pragma mark -
- #pragma mark UIDocumentInteractionControllerDelegate
- - (UIViewController *)documentInteractionControllerViewControllerForPreview:(UIDocumentInteractionController *)interactionController
- {
- return self;
- }
Diese schicke Vorschau möchte ich jetzt in mein DetailViewController eines UISplitViewControllers anzeigen lassen. Hat jemand damit schon Erfahrungen gemacht ?
Danke für Tipps !
Si tacuisses, philosophus mansisses !