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

  • Home
  • SEARCH
  • 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 7526199
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T03:46:17+00:00 2026-05-30T03:46:17+00:00

I am trying to determine a Single Tab on a View inside of a

  • 0

I am trying to determine a Single Tab on a View inside of a UIScrollView. The Problem is that The UIScrollview catches all the gestures.

What I tried so far:
I override the following method in my UIScrollView:

-(BOOL)touchesShouldBegin:(NSSet *)touches withEvent:(UIEvent *)event inContentView:(UIView *)view
{
    UITouch *touch = [touches anyObject];
    if([touch tapCount]== 2) return YES;

    return NO;
}

This works fine, I can now reach the UITapGestureRecognize on my UIView, unfortunately I can only detect double-taps because the [touch tapCount] == 1 is always beeing called (dragging or zooming in the UIScrollView). But actually the UIScrollview does not need the “Single-Tap-Function”

Is there a way to decide between a drag (Scroll or zoom) and a single Tap inside this method? I cant find it..

-(BOOL)touchesShouldBegin:(NSSet *)touches withEvent:(UIEvent *)event inContentView:(UIView *)view

Thanks in advance
Fabi

  • 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-05-30T03:46:18+00:00Added an answer on May 30, 2026 at 3:46 am

    It sounds like you only want the tap recognizer to succeed if the touch doesn’t scroll the scroll view. This is pretty easy because the scroll view uses a pan gesture recognizer for scrolling. On iOS 5, you can just do this:

    [self.tapRecognizer requireGestureRecognizerToFail:self.scrollView.panGestureRecognizer];
    

    If you want to support older versions of iOS, you have to do this:

    for (UIGestureRecognizer *recognizer in self.scrollView.gestureRecognizers) {
        if ([recognizer isKindOfClass:[UIPanGestureRecognizer class]])
            [self.tapRecognizer requireGestureRecognizerToFail:recognizer];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to determine every single reference inside a dll with System.Reflection .
I'm trying to determine which tab has been selected by the user. I melded
I'm trying to determine how to access the data that is in my JObject
I am trying to determine document similarity between a single document and each of
I am trying to clean up a legacy database by dropping all procedures that
I'm trying to determine a way to find all words in a database table
What I'm trying to do is have a single function for each UIButton that
I am trying to compare objects in an object[] that are of a single
I am trying to write a .oct function for Octave that, given a single
Trying to determine if it is possible to bind the SelectedValue of a ComboBox

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.