Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9120919
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T05:44:18+00:00 2026-06-17T05:44:18+00:00

I copied some good pdf viewing code from Julius Oklamcak. https://github.com/vfr/Viewer It works great

  • 0

I copied some good pdf viewing code from Julius Oklamcak. https://github.com/vfr/Viewer
It works great in his app when I do not modify it, but it gets messed up when I put it in my own app.
I removed the print, bookmark, and tile view buttons fyi.

The DONE button is not working.

Here is the error I am receiving:

2012-12-18 10:01:45.857 TeacherTableView4[1147:907] *** Assertion failure in -[ReaderViewController tappedInToolbar:doneButton:], (...my path to)/TeacherTableView4/ReaderViewController.m:844
2012-12-18 10:01:45.859 TeacherTableView4[1147:907] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Delegate must respond to -dismissReaderViewController:'
*** First throw call stack:
(0x371b52a3 0x3bd9497f 0x371b515d 0x3a2682af 0x40967 0x3c9f1 0x3676f0a5 0x3676f057 0x3676f035 0x3676e8eb 0x3676ede1 0x366975f1 0x36684801 0x3668411b 0x34a4f5a3 0x34a4f1d3 0x3718a173 0x3718a117 0x37188f99 0x370fbebd 0x370fbd49 0x34a4e2eb 0x366d82f9 0x414bd 0x36557b20)
libc++abi.dylib: terminate called throwing an exception

Here is the code:

- (void)tappedInToolbar:(ReaderMainToolbar *)toolbar doneButton:(UIButton *)button
{
#ifdef DEBUGX
    NSLog(@"%s", __FUNCTION__);
#endif

#if (READER_STANDALONE == FALSE) // Option

[document saveReaderDocument]; // Save any ReaderDocument object changes

[[ReaderThumbQueue sharedInstance] cancelOperationsWithGUID:document.guid];

[[ReaderThumbCache sharedInstance] removeAllObjects]; // Empty the thumb cache

//COMMENTED OUT BY ME
//if (printInteraction != nil) [printInteraction dismissAnimated:NO]; // Dismiss

if ([delegate respondsToSelector:@selector(dismissReaderViewController:)] == YES)
{
    [delegate dismissReaderViewController:self]; // Dismiss the ReaderViewController
}
else // We have a "Delegate must respond to -dismissReaderViewController: error"
{
    NSAssert(NO, @"Delegate must respond to -dismissReaderViewController:");
}

#endif // end of READER_STANDALONE Option
}

I would really appreciate some help with this guys. Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T05:44:20+00:00Added an answer on June 17, 2026 at 5:44 am

    I ran into the same problem using this PDF viewing code. I simply added this method

    - (void)dismissReaderViewController:(ReaderViewController *) viewController 
    {
    [self dismissModalViewControllerAnimated:YES];
    }
    

    to the .m file where I’m calling the - (IBAction)didClickOpen from.
    This is mainly due to the fact that in ReaderViewController.m the delegate expects to see dismissReaderViewController declared in your implementation file. Otherwise, it will throw that error you’re getting.

    Note: Use [self dismissViewControllerAnimated:YES completion:nil]; for iOS6 or later since dismissModalViewControllerAnimated:YES was deprecated 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have copied some files from project A to project B, both of which
some code snippets. The java coding doing the jaxb unmarshaling. pretty straightforward, copied out
I was trying the open graph tutorial from Facebook developers site. http://developers.facebook.com/docs/opengraph/tutorial/ I copied
I coded some calculation stuff (I copied below a really simplifed example of what
I have some 3rd party libraries and includes (I have copied them to the
I am processing some CSV file which i have copied in Bin folder of
I've got an application where some assemblies are copied to C:\Windows\assembly upon deployment under
I'm working on some doc file, that when copied and pasted into a text
This question is based off some really odd code I recently found in a
I am using TFS 2008 and team build to compile some Java code using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.