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

  • Home
  • SEARCH
  • 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 977629
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T03:55:56+00:00 2026-05-16T03:55:56+00:00

I have a a xib with a toolbar and on that I have 2

  • 0

I have a a xib with a toolbar and on that I have 2 buttons all made in IB.
I can connect my outlets to the buttons but when I click them the method isn’t triggered?
Why is that?

In my header file I have this:

@property (nonatomic, retain) IBOutlet UIBarButtonItem *cancelEntry;
@property (nonatomic, retain) IBOutlet UIBarButtonItem *saveEntry;

-(IBAction) cancelEntry:(id) sender;
-(IBAction) saveEntry:(id) sender;

In my .m file I got this:

-(IBAction) cancelEntry:(id) sender {
 NSLog(@"cancel");
}

-(IBAction) saveEntry:(id) sender {
 NSLog(@"save");
}

All compiles as it should but no nothing in the log when clicking the buttons.
What should I do to get it to work?

  • 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-16T03:55:57+00:00Added an answer on May 16, 2026 at 3:55 am

    Sounds like you connected your outlets to the buttons, but didn’t connect the buttons to the actions.

    1. Right click Cancel the UIBarButtonItem in Interface Builder.
    2. Hover over Selector, then drag the + that appears onto File’s Owner.
    3. Connect it to cancelEntry:.
    4. Repeat for Save.

    Instead of using (id) for your IBActions, you should probably use (UIBarButtonItem *). That’ll prevent you from connecting a different object type to those IBActions.

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

Sidebar

Related Questions

I have 3 xib files, 3 buttons on all of the xib files and
I have a XIB file (view) that has a toolbar and a view right
So i have an xib that has some UILabels and 1 MKMapView but the
I have an app with a standard UIView that contains a toolbar. I am
Hello I have a view controller that loads from an xib i created. It
We have a xib that was currently designed for the iPhone. We are porting
I have a NavigationController in MainWindow.xib. It loads a RootViewController that basically manages a
I am new to iPhone, I have added a toolbar in my .xib file
I have basic *.xib file, which have NSView. How can I use another nib
I use the Xcode and add a UI elements on that, but there have

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.