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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T19:20:22+00:00 2026-05-28T19:20:22+00:00

I have a UITapGestureRecognizer which basically performs an action to add a subview. When

  • 0

I have a UITapGestureRecognizer which basically performs an action to add a subview. When I tap I only want the subview to load once, however when I tap twice really fast, it performs the action twice. How can I prevent this? Basically after it’s tapped once I want the tap gesture recognizer to be disabled temporarily for some seconds. Is there a way to do this?

  • 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-28T19:20:23+00:00Added an answer on May 28, 2026 at 7:20 pm

    Disable your tap recognizer in the selector that the recognizer calls. Override didAddSubview in the view to which you add subviews on tapping the recognizer, and re-enable it from there. The recognizer will remain inactive through the time while the new subview is being added. If you animate the addition, you should get a sufficient delay to avoid reacting to double-taps.

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

Sidebar

Related Questions

I currently have this in my code tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(updateLeftLabel:)]; which
I have a UIWebView in which it has a UITapGestureRecognizer and basically in my
I have a UIView in which I added a UITapGestureRecognizer . Inside that view
I have three UILabels. I want to detect which label is Tapped, and then
I have a question which is mostly answered by this question . However, I
I have multiple views defined in my main view. I want to add single
I have a number of classes and want to add a UIGestureRecognizer to their
I have a scrollable, non-ediable UITextView. I want to add a gesture recognizer to
I have 5 UIImageView and one UITapGestureRecognizer, but when I tap on my UIImageView
I have a UITapGestureRecognizer in a custom table cell which is intended to do

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.