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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T10:10:27+00:00 2026-06-06T10:10:27+00:00

I have a UIView parentView which implements a UITapGuestureRecognizer and does something when tapped.

  • 0

I have a UIView parentView which implements a UITapGuestureRecognizer and does something when tapped. parentView has a sub view called childView which also implements a UITapGuestureRecognizer and does something when tapped.

There is an instance when I have to turn off the childViews UITapGestureRecognizer during an animation for a slight moment, and I noticed when it is turned off and I tap childView, the tap gets intercepted by parentView. Also, I have a toolbar attached to the top of this view that doesn’t have any gesture recognizer attached to it, and it’s touches get passed parentView (the buttons will barely work). I’m wondering is it possible to disable this without having a reference to the parents UITapGestureRecognizer?

I’ve tried using the exclusiveTouches property of UIView set to yes and it doesn’t work. Any suggestions would be appreciated.

  • 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-06T10:10:29+00:00Added an answer on June 6, 2026 at 10:10 am

    In the parent gesture recognizers, implement the UIGestureRecognizerDelegate, and implement the following method:

    - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch 
    {
        if ([touch.view isKindOfClass:[ClassThatYouWantTouchesBlocked class]]) 
        {
            return NO;
        }
        else 
        {
            return YES; 
        }
    }
    

    Replace ClassThatYouWantTouchesBlocked with the class that you want its touches to be ignored.

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

Sidebar

Related Questions

I have a UIView which is my loading view. All it does is display
I have a UIView called activityView , which contains two subviews activityIndicator and cancelOperationsButton
I have a UIScrollView which has a UIView embedded in it. It have 2
I have a UIView that gets added to my UITableView .view as a subview.
I have a strange problem which probably has a very simple solution, I just
I am creating a section view programmatically and I have a UIButton delete also
I have 3 pickers on my view, one of which contains only images. So,
I have a UIView-based class called Icon. In there, I want to have code
I have a UIView with an alpha of 0.5 which I add as a
I have two views (UIView) set-up: parent and child view. The child view is

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.