I need to use a QLPreviewController
in order to open PDF and JPEG documents into my app. I implemented it in this way:
-(void)openQuickLook{
QLPreviewController *preview = [[QLPreviewController alloc] init];
preview.currentPreviewItemIndex = 0;
preview.delegate = self;
preview.dataSource = self;
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:preview];
[self presentViewController:nav animated:YES completion:nil];
}
#pragma mark - Quicklook
-(NSInteger)numberOfPreviewItemsInPreviewController:(QLPreviewController *)controller{
return photos.count;
}
-(id<QLPreviewItem>)previewController:(QLPreviewController *)controller previewItemAtIndex:(NSInteger)index{
return photos[index];
}
When I call the openQuickLook
method, the preview controller is shown with a bottom bar with editing tools - similar to the iOS "Markup" feature. This happens only on JPEG files. The bar is fixed on the screen; I can choose colours and size but I can't draw anything on the image.
I need to remove this bar from the preview view controller, but I haven't found anything about this feature on the web.