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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:22:34+00:00 2026-06-18T08:22:34+00:00

Question I have a .xib with a UIButton . That UIButton has a connection

  • 0

Question

I have a .xib with a UIButton. That UIButton has a connection via Touch Up Inside to a method, - (IBAction)play:(id)sender, in the File’s Owner.

When I run on a first-gen iPad the UIButton shows it’s highlighted state when tapped, but doesn’t call the connected method. I set a breakpoint at the first line of the method, and it’s never hit.

When I run the app on a second-gen iPad, everything works properly.

I’ve hacked blindly at the issue a bit, but I’m hoping someone else has an insight to what might be going on. Any idea what I’m overlooking?

Update, partial solution

Thanks to Stavash’s help, I see that the source of the issue is the gesture recognizer attached to the view containing the button.

When I remove the gesture recognizer, everything works.

I see a related question that indicates a solution using the UIGestureRecognizerDelegate to prevent the gesture recognizer from responding when the button is tapped.

However, even though the delegate method is returning NO when the button is tapped, the Touch Up Inside event still doesn’t seem to be firing.

- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch {
    if ((touch.view == self.playButton)) {
        return NO;
    }
    return YES;
}

code taken from related question, linked above

I’ll experiment some more tomorrow, and post again if I figure out where I went 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-06-18T08:22:35+00:00Added an answer on June 18, 2026 at 8:22 am

    Chances are (strange as it may seem) that you have an active UITapGestureRecognizer in that view controller that’s reacting differently in each iOS version. Try cancelling any active instance of a gesture recognizer and see if it works.

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

Sidebar

Related Questions

I have a custom UIView (MyView) object that gets loaded from a xib file.
I have a tabBar initilized in xib file, question is, I want to deselect
I have a subclass of UIView that's instantiated in a XIB file. I need
I have a basic question regarding iOS development. I have created view file ViewController.xib.
I currently have a xib that is a standard view that has another view
A beginner's question: If, in your nib, you have the File's Owner linked to
I have set a inputAccessoryView as Referencing Outlet of the XIB's file View which
I have a problem where the button's I have added to .xib file are
Hello I would like to have my app pick a randome XIB file to
I have a xib file with only an NSPanel in it, I'm trying to

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.