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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:18:31+00:00 2026-05-26T16:18:31+00:00

I Know filtering oneTap/doubleTap using a Apple API. code are follows. UITapGestureRecognizer *doubleTapGestureRecognizer =

  • 0

I Know filtering oneTap/doubleTap using a Apple API. code are follows.

UITapGestureRecognizer *doubleTapGestureRecognizer = [[UITapGestureRecognizer alloc]
                        initWithTarget:self action:@selector(handleDoubleTap:)];
doubleTapGestureRecognizer.numberOfTapsRequired = 2;


[self addGestureRecognizer:doubleTapGestureRecognizer];


UITapGestureRecognizer *singleTapGestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleSingleTap:)];
singleTapGestureRecognizer.numberOfTapsRequired = 1;

**[singleTapGestureRecognizer requireGestureRecognizerToFail: doubleTapGestureRecognizer];**

[self addGestureRecognizer:singleTapGestureRecognizer];

but oneTap/doubleTap checkDelayTime is feeling a so Long (About 0.5sec?).
Generally App Users of the reaction is very fast. Although 0.5 seconds is typically short-time. but In Mobile Device Environment is long-time, because users react is very important.

Speaking to the point, YouTubeAppenter image description here have a very Perfectly algorithm about filtering at a moment oneTap/doubleTap. oneTap-doubleTap checkDelay is VeryVeryShort Perfectly Optimization.

oneTap(show/hidden controlBar)

doubleTap(full/default videoScreenSize)

How to implement like YoutubeApp? about oneTap-doubleTap filtering Not Using a requireGestureRecognizerToFail Selector. about very short delay oneTap-doubleTap distinguishing.

I think YoutubeApp is Not Use a requireGestureRecognizer Selector.

  • 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-26T16:18:32+00:00Added an answer on May 26, 2026 at 4:18 pm

    This is easiest to do without gesture recognizers. Then you can control the delay. The code below is a variation of Apple’s original documentation that I use in one of my projects. I have blog post that talks about it as well.

    - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
     UITouch *touch = [touches anyObject];
    if (touch.tapCount == 2) {
    //This will cancel the singleTap action
    [NSObject cancelPreviousPerformRequestsWithTarget:self];
    }
    
    }
    
    - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event{
     UITouch *touch = [touches anyObject];
    if (touch.tapCount == 1) {
      //if they tapped within the coin then place the single tap action to fire after a delay of 0.3
      if (CGRectContainsPoint(coin.frame,[touch locationInView:self.view])){
        //this is the single tap action being set on a delay
      [self performSelector:@selector(onFlip) withObject:nil afterDelay:0.3];
      }else{
       //I change the background image here
      }
     } else if (touch.tapCount == 2) {
      //this is the double tap action
      [theCoin changeCoin:coin];
     }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Anyone know a good solution for filtering input using jQuery? I'd like to do
As you may know Coherence provides filtering api against its cache-cluster, like this: //
Know if it's possible to access the iPhone compass in Safari using JavaScript? I
Do you know of a method for quickly filtering a list of strings to
Does anyone know of a good function out there for filtering generic input from
Basically I want to know which one of is better for accessing cube using
I am currenlty using the JTable rowFilter for filtering my rows. The filter hide
don't know if this is possible.. I'm using sqlite3 schema: CREATE TABLE docs (id
I would like to know if exist any desing pattern for filtering elements base
Short story I've got a PHP script filtering incoming mail using a .qmail file.

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.