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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:00:49+00:00 2026-05-26T14:00:49+00:00

I have a RootViewController & it’s associated nib or xib file. This nib is

  • 0

I have a RootViewController & it’s associated nib or xib file. This nib is loaded as the app starts. This nib file contains a UIScrollView in this scrollview I put another custom generated nib – newNib.xib file.

In this newNib.xib I have made changes in interface builder to respond to RootViewController i.e. Custom Class – RootViewController. Then I linked some UIView objects that I created in RootViewController. All fine so far…

I have defined some tapGestureRecognisers in RootViewController on the UIViews defined in newNib.xib but they are not responding to the tap events. Tap Events i defined in RootViewController like this –

UITapGestureRecognizer *messagesTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(messagesBucketTap:)];
[messagesTap setNumberOfTapsRequired:1];
[messagesTap setNumberOfTouchesRequired:2];
[self.messagesSnippet addGestureRecognizer:messagesTap];
[messagesTap release];

here self.messagesSnippet is present in newNib.xib Also I load the xib in RootViewController like so –

[[NSBundle mainBundle] loadNibNamed:@"newNib" owner:self options:nil];

But still I dont get the tapGesture to the selector (messagesBucketTap). What am i doing wrong?

  • 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-26T14:00:50+00:00Added an answer on May 26, 2026 at 2:00 pm

    The most likely cause is that you forgot to set the delegate of the tap gesture recognizer e.g. [messagesTap setDelegate:self].

    Assuming -messagesBucketTap: is declared in the same class, Change your code to:

        UITapGestureRecognizer *messagesTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(messagesBucketTap:)];
        [messagesTap setDelegate:self];
        [messagesTap setNumberOfTapsRequired:1];
        [messagesTap setNumberOfTouchesRequired:2];
        [self.messagesSnippet addGestureRecognizer:messagesTap];
        [messagesTap release];
    

    If this doesn’t work, check what Jamie said, and make sure you are declaring:

    - (void)messagesBucketTap:(UITapGestureRecognizer *)gestureRecognizer;
    

    and not

    - (void)messagesBucketTap;
    

    Also, are you tapping once with two fingers? Lastly, ensure that that userInteractionEnabled is YES on the UIView’s and that exclusiveTouch is NO on the UIScrollView

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

Sidebar

Related Questions

I have this button on the leftside of my UISplitViewController (RootViewController) that has a
I have a viewController with this: @interface RootViewController : UIViewController <UITextFieldDelegate>{ Then I have
I have another orientation problem. But this one is very tricky. My RootViewController is
i have class like this DrillDownAppAppDelegate.h PictureCell.h RootViewController.h SlideShowViewController.h DrillDownAppAppDelegate.m PictureCell.m RootViewController.m SlideShowViewController.m i
I have an iPad app and I'm having an issue in my rootViewController .
I have a UITableViewController, which is RootViewController. It's XIB only has a table view.
So I made my iPhone app universal, it created a new mainWindow xib file
I`m building simple app which shows information about most car brands. I have rootViewController
I have a RootViewController that is a UIViewController with a UITableView. This RootViewController pushes
I have a rootviewcontroller and a loginviewcontroller. As soon as my app has finished

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.