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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T15:02:25+00:00 2026-05-22T15:02:25+00:00

I have a scrollable, non-ediable UITextView. I want to add a gesture recognizer to

  • 0

I have a scrollable, non-ediable UITextView. I want to add a gesture recognizer to it so when double tap it, a tool bar will show, double tap it again, tool bar will hide.

I have disabled the selection function of the text view by subclassing it and override canBecomeFirstResponder to return NO.

It seems ok when i just simply add the tap recognizer to it.

UITapGestureRecognizer *tapRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(showOrHideToolbars)];
tapRecognizer.numberOfTapsRequired = 2;
tapRecognizer.numberOfTouchesRequired = 1;
[textView addGestureRecognizer:tapRecognizer];

It works good, excepts if i tap and hold on the text view, after that, the recognizer will not receive any action any more.

This means, if I tap and hold on the text view (i guess text view goes into a selection mode even i disable the selection function), no more double tap can be detected now.

I tried to use single tap then problem is gone but i do need to use double tap.

I also tried to override touch event handler methods, but no use.

  • 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-22T15:02:26+00:00Added an answer on May 22, 2026 at 3:02 pm

    There are a number of other gesture recognizers attached to a text view. Since you don’t seem to need them. You can remove them.

    textView.gestureRecognizers = nil;
    

    before adding your double tap recognizer. It works.

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

Sidebar

Related Questions

I have been trying to add a scroller to my context section that will
I have only one list div and I want to make it scrollable. I
Simply stated - I want to have a scrollable text field with a paragraph
I have a div that is scrollable that I want to conditionally stop scrolling.
When creating scrollable user controls with .NET and WinForms I have repeatedly encountered situations
I have a scrollable div tag (overflow). Now I'd like to use mouse to
I have a scrollable map app which for now has a huge bitmap. It
I have a scrollable area that contains popup menus. Conceptually, something like this: <div
I have a main JPanel which implements Scrollable and uses a BorderLayout. It contains
I have a div tag <div id=customError>Error</div> I want this div tag to always

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.