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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:57:02+00:00 2026-05-28T01:57:02+00:00

I have a segmented control in the header of a navigation controller, I want

  • 0

I have a segmented control in the header of a navigation controller, I want to add an object to a table view controller thats also in this navigation controller.

Heres where my question comes in:

How do I segue from one [+] UIButton to 1 of 2 views, a different add view for each segmented control option. You can only hook up one segue from a UIBarButtonItem in the storyboard, but I wasn’t sure If i just hook one up and then change the code somewhere or if i have to build separate xib files (which I’m not familiar with, I’m new to iPhone dev) or how this would work!

Please help!

  • 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-28T01:57:02+00:00Added an answer on May 28, 2026 at 1:57 am

    You make what I call “generic” segues that are not associated with an action/trigger. See my answer here: How to make and use generic segue

    Make 2 of these segues, then in your IBAction method for your segmentedControl call performSegueWithIdentifier:. For example:

    - (IBAction)segmentCtrlChanged:(id)sender {
     UISegmentedControl *seg = sender;
     if (seg.selectedSegmentIndex == 0) 
       [self performSegueWithIdentifier:@"segue1" sender:self];
     else if (seg.selectedSegmentIndex == 1) 
       [self performSegueWithIdentifier:@"segue2" sender:self];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have one view controller set with one graph view and segmented control inside
I have a view containing a segmented controller and a UIDatePicker that only shows
I have a view controller (derived from UIViewController not UITableViewController) containing a table view.
https://i.stack.imgur.com/2KxdM.png I have this segmented control that I made, however I don't know how
I'm using Backbone.js have a segmented control-type UI element for each model's view. They
I have implemented a UISegmentControl as the rightBarButton of my detailViewController. This view controller
I have a view with some fields (name, price, category) and a segmented control,
I have a segmented control where the user can select how to order a
I have a UIScrollView that contains an image and a segmented control that allows
I have a UINavigationController. In its toolbar is a segmented control with two buttons.

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.