From 911607376b781f53da6732ed5a5370e6b97797b7 Mon Sep 17 00:00:00 2001 From: Yury Lapitsky Date: Mon, 4 May 2015 20:13:06 +0300 Subject: [PATCH] Defaults settings were cut away from loadDocument --- Classes/View/PDFKBasicPDFViewer.m | 7 ------- M13PDFKit/SamplesTableViewController.m | 5 +++++ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Classes/View/PDFKBasicPDFViewer.m b/Classes/View/PDFKBasicPDFViewer.m index 7809ba3..f293134 100644 --- a/Classes/View/PDFKBasicPDFViewer.m +++ b/Classes/View/PDFKBasicPDFViewer.m @@ -115,13 +115,6 @@ - (void)loadDocument:(PDFKDocument *)document self.view.backgroundColor = [UIColor groupTableViewBackgroundColor]; //Defaults - _enableBookmarks = YES; - _enableSharing = YES; - _enablePrinting = YES; - _enableOpening = YES; - _enableThumbnailSlider = YES; - _enablePreview = YES; - _standalone = YES; _document = document; //Create the thumbs view diff --git a/M13PDFKit/SamplesTableViewController.m b/M13PDFKit/SamplesTableViewController.m index cb9c3fa..1aadc80 100644 --- a/M13PDFKit/SamplesTableViewController.m +++ b/M13PDFKit/SamplesTableViewController.m @@ -40,6 +40,11 @@ - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { if ([segue.identifier isEqualToString:@"Basic Sample"]) { //Create the document for the viewer when the segue is performed. PDFKBasicPDFViewer *viewer = (PDFKBasicPDFViewer *)segue.destinationViewController; + viewer.enableBookmarks = YES; + viewer.enableOpening = YES; + viewer.enablePrinting = YES; + viewer.enableSharing = YES; + viewer.enableThumbnailSlider = YES; //Load the document PDFKDocument *document = [PDFKDocument documentWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"Wikipedia" ofType:@"pdf"] password:nil];