Skip to content

Instantly share code, notes, and snippets.

@KiranPanesar
Last active December 17, 2015 14:09
Show Gist options
  • Save KiranPanesar/5622361 to your computer and use it in GitHub Desktop.
Save KiranPanesar/5622361 to your computer and use it in GitHub Desktop.
-(void)updateReaderDocument:(ReaderDocument *)object {
// Remove all the subviews
[[self.view subviews] makeObjectsPerformSelector:@selector(removeFromSuperview)];
document = object; // Update the PDF document
[object updateProperties]; // Update the properties
[ReaderThumbCache touchThumbCacheWithGUID:object.guid]; // Reload thumb images
// Set up all subviews and trigger all other set up
[self viewDidLoad];
[self viewWillAppear:YES];
[self viewDidAppear:YES];
if (currentPage == 1) {
currentPage = -1;
}
[self showDocumentPage:1]; // Show the first page
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment