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 7955525
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T03:44:00+00:00 2026-06-04T03:44:00+00:00

Ok, so what I am trying to do is create a Document Viewer that

  • 0

Ok, so what I am trying to do is create a Document Viewer that is similar this picture:
enter image description here

Basically what should happen is, when the screen is tapped anywhere, the top and bottom bar will appear. Tap again and they disappear.

I have subclassed QLPreviewController and have managed to leverage the (top) navigation bar that already comes with QLPreviewController. This works fine. Now I need to get the bottom bar to display whenever the top bar is displayed. I can add a UIToolbar to the bottom of the page, but I need to intercept the touch events so I can hide/unhide the bottom bar. I cannot seem to figure out how to get it to work. I tried adding a UITapGestureRecognizer to the view of the QLPreviewController subclass itself to no luck. I also tried creating an overlay UIView that has a UITapGestureRecognizer but that prevented the user form interacting with the document underneath.

Anyone have any ideas at all on how to do this? Thanks in advance!

  • 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-04T03:44:05+00:00Added an answer on June 4, 2026 at 3:44 am

    Ok, I figured out what the issue was with the UITapGestureRecognizer. You need to set the delegate to self, and then override the

    - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer

    function and return yes. So in my QLPreviewController subclass, I implemented the UIGestureRecognizerDelegate, and in the viewWillAppear:

    UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(documentTapped:)];
    tapGesture.cancelsTouchesInView = NO;
    tapGesture.delegate = self;
    [self.view addGestureRecognizer:[tapGesture autorelease]];
    

    Then simply:

    - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
        return YES;
    }
    

    This way, the QLPreviewController will still receive all the other non-tap touch events so that the user can still interact with the document

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

Sidebar

Related Questions

I am trying to create an HTML document that should look something like Some
LowDown: I am trying to create a Document Viewer in WPF. It will allow
I'm trying to create a project-like document, in that it contains subdocuments in a
This could just be a syntax error, but I'm trying to create a Document
Trying to create a simple document that gets the parentNode then applies a background
I'm trying to create a function that would return a PDF document. Something like
I'm trying to create a standalone HTML5 document that utilizes SQlite or some other
I'm trying to create a standalone HTML5 document that utilizes SQlite. I want to
I am trying to create a unit test that generates an empty test document
I'm trying to create an in-memory xml document such that the root's child nodes

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.