I'm failed to hide the right thumbnail bar on tap when I add QLPreviewController as a childviewcontroller. I'm using the following code:
#import <QuickLook/QuickLook.h>
-(void)viewDidLoad
{
if ([QLPreviewController canPreviewItem:[[NSBundle mainBundle] URLForResource:@"myFile" withExtension:@"pdf"]])
{
QLPreviewController *previewController = [[QLPreviewController alloc] init];
previewController.dataSource = self;
[self addChildViewController:previewController];
[viewQuickLook addSubview:previewController.view];
[previewController didMoveToParentViewController:self];
}
}
-(NSInteger) numberOfPreviewItemsInPreviewController:(QLPreviewController *)controller
{
return 1;
}
- (id <QLPreviewItem>)previewController:(QLPreviewController *)controller previewItemAtIndex:(NSInteger)index
{
NSURL *pdfURL = [[NSBundle mainBundle] URLForResource:@"myFile" withExtension:@"pdf"];
return pdfURL;
}
While I'm using the following code I'm able to hide the thumbnail bar on tap.
QLPreviewController *previewController = [[QLPreviewController alloc] init];
previewController.dataSource = self;
[self presentViewController:previewController animated:YES completion:nil];
But I don't want the navigation bar of QLPreviewController.