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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T04:01:07+00:00 2026-06-15T04:01:07+00:00

I have an from UIViewController derived Class named AdminViewController. I want to enable singleTab

  • 0

I have an from UIViewController derived Class named AdminViewController.

I want to enable singleTab Recognizer to this View.

The View is Called in an the MainViewController with:

AdminViewController* AdminViewC = [[AdminViewController alloc]init];
[self.view addSubview:AdminViewC.view];

In the AdminViewController.m

- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer{
    if([gestureRecognizer isKindOfClass:[UITapGestureRecognizer class]])
    {
        [gestureRecognizer addTarget:self action:@selector(tappedGestureAction:)];
    }
    return YES;
}

-(void)tappedGestureAction:(UITapGestureRecognizer *)tap{
    UIAlertView *av = [[UIAlertView alloc] initWithTitle:@"View Tapped" message:@"Tapped" delegate:nil cancelButtonTitle:@"Dissmiss" otherButtonTitles:@"Done", nil];
    [av show];
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    [self.view setFrame:CGRectMake(500, -200, 200, 300)];
    UITapGestureRecognizer *singleFingerTap =
    [[UITapGestureRecognizer alloc] initWithTarget:self.view action:@selector(handleSingleTap:)];
    [self.view addGestureRecognizer:singleFingerTap];
}

If i Touch the View in my MainViewController i get this:

‘NSInvalidArgumentException’, reason: ‘-[UIView handleSingleTap:]: unrecognized selector sent to instance 0x296d50’

has someone a hint?
regards, phil

  • 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-06-15T04:01:07+00:00Added an answer on June 15, 2026 at 4:01 am

    You have added your gesture on self.view, but you did not implement single tap selector:

    -(void)handleSingleTap:(UITapGestureRecognizer*)tapGesture
    {
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a View controlled by WorkController (derived from UIViewController) On the view I
i have a custom UIView which is presented from a UIViewController . This view
In my class derived from UIViewController I have a class variable of type UIWebView*
I have a view controller (derived from UIViewController not UITableViewController) containing a table view.
I have created two instances of a MasterViewController derived from UIViewController class _masterViewController =
I have derived my own View class from UIView that handles gestures and drawing
I have my view controller class MyVC extending from UIViewController class. In the designated
I have a UIViewController derived class which uses the method dismissModalViewControllerAnimated:(BOOL) , like this:
I have a class called BaseViewController that inherits from UIViewController and a class called
I have an existing iPhone application which starts from a UIViewController. What I want

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.