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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T23:33:19+00:00 2026-05-30T23:33:19+00:00

I am experiencing this strange behavior. I create a clean project (view template), add

  • 0

I am experiencing this strange behavior.

I create a clean project (view template), add a toolbar with a button and hook it up with an action. it works 😉
BUT, then when I add a UITapGestureRecognizer to the view of my viewcontroller the toolbar button stops working. (It is pressed but its action is not called)
When I add the UITapGestureRecognizer only the action linked to it is called. It is like uitapgesture recognizer view were hiding the toolbar but actually is not.

What is happening here? What am I missing?

- (IBAction)itemAction{
    NSLog(@"%s", _cmd);
    self.view.backgroundColor = [UIColor whiteColor];
}
- (void) tapAction{
    NSLog(@"%s", _cmd);
    self.view.backgroundColor = [UIColor greenColor];
}
- (void)viewWasTapped:(UITapGestureRecognizer *)recognizer{
    if (recognizer.state == UIGestureRecognizerStateRecognized) {
        [self tapAction];
    }
}
- (void)viewDidLoad {
    [super viewDidLoad];
    UITapGestureRecognizer *tapGestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(viewWasTapped:)];
    [tapGestureRecognizer setNumberOfTapsRequired:1];
    [self.view addGestureRecognizer:tapGestureRecognizer];
    [tapGestureRecognizer release]; 
}

EDIT: the project source can be downloaded from here

Thanks in advance for any advice

Ignacio

  • 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-30T23:33:20+00:00Added an answer on May 30, 2026 at 11:33 pm

    Eventually I found the reason:

    tapGestureRecognizer.cancelsTouchesInView = NO;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am experiencing a strange behavior with very basic web service development. This question
I'm experiencing some strange behavior with a project i'm working on: http://daft.net76.net/yah/ When you
I experiencing a strange behavior of C#. Its some thing like this.. var date
I'm experiencing this problem: I want to add the Google Maps API to my
I am experiencing some very strange behavior with Blend: Since weeks i am working
I'm experiencing what I would consider somewhat strange behavior. Specifically if I have a
I am experiencing some strange behavior with SQL Server CE 3.5 SP2. I have
I'm new to Drupal and am experiencing this strange problem with my testing Drupal
I have been experiencing strange behavior with the header drawing the first time. Here
I am experiencing some strange behavior in my datagrid when I have a second

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.