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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:46:14+00:00 2026-05-27T16:46:14+00:00

I created a single view project in xcode 4. I added a navigation bar

  • 0

I created a single view project in xcode 4. I added a navigation bar item object. In that I added a navigation bar button called “Done”. All using he Xcode drag and drop. To that button I attached a very simple IBAction

- (IBAction) newContactDoneBtn:(id)sender
{  
    NSLog(@"INSIDE newContactDoneBtn");
}

In the “sent actions” I connected that Done button with this newContactDoneBtn IBAction. So far so good. If I compile and run it works fine i.e. I see the message log.

Now here’s the kicker, if to that Done button I attach a modal storyboard i.e. when the user clicks on that Done button it takes them to another view controller … my custom IBaction “newContactDoneBtn” never gets called and I see the new screen. Now why would that be?

An easy example to visualize all this would be the “Done” button in iphone contacts app. When you click on adding a new contact there is the done button up there, you enter something in the fields and hit done, it takes you to another view controller and it did add that new contact to the address book.

It maybe a limitation of UIBarButtonItem but can anyone tell me if I missed something?

  • 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-27T16:46:15+00:00Added an answer on May 27, 2026 at 4:46 pm

    Adding the segue to the button presumably overrides any action you had applied to it. Is the action still connected in interface builder after you’ve set the segue?

    Why would you want both things to happen? What order should they be done in if you were able to fire an action and a segue simultaneously?

    If you just want to call the modal view controller, then connecting the segue does that for you without needing to write any code. You can run anything you need in the prepareForSegue: method of your view controller. Alternatively, you can manually present the modal controller from your action method.

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

Sidebar

Related Questions

I have a project that I created by using Xcode's Single View Application template.
I've made a new project as a Single View iOS Application in Xcode. I've
Using Xcode 4.2.1 iPad iOS 5.0.1, create a new Single View iPad project. In
I created an empty Single View application using Xcode 4.2 on OSX Lion 10.7.2
I have a single spool mbox file that was created with evolution, containing a
Currently I have created a ABCFactory class that has a single method creating ABC
I am to process single PDFs that have each been created by 'merging' multiple
I've added a new MDF file to a .NET4.0 class library project, created a
Hello all I have a project where I need to perform single value bindings
How do I create more than 40-50 textfields and labels in a single view

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.