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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T02:50:27+00:00 2026-05-31T02:50:27+00:00

I have an iPhone app I’m currently building in XCode 4.3 with Storyboard. I

  • 0

I have an iPhone app I’m currently building in XCode 4.3 with Storyboard. I have a “root” view controller with two (2) seques to a view controller containing a UIWebView. I want to be able to identify the segue (have already set unique identifiers for both segues) so I can “push” the correct content to the UIWebView, based on which segue was activated in the “root” view controller.

I think I have to use “prepareForSegue” method, but don’t know where it would go. Where can I find out how to deal with two segues going to the same view controller? (I have google’d it and found nothing appropriate to my situation).

Here is the code that I’m using:

-(void) prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    if ([segue.identifier isEqualToString:@"helpSegue"]) {
        NSLog(@"helpSegue");
    }
    else if ([segue.identifier isEqualToString:@"reportSegue"]) {
        NSLog(@"reportSegue");
    }
}
  • 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-31T02:50:28+00:00Added an answer on May 31, 2026 at 2:50 am

    You won’t call -prepareForSegue:sender:, you’ll implement it in your view controller. In it’s override of that method, you can check the segue’s identifier property (the segue is passed in as a parameter):

    if ([segue.identifier isEqualToString:@"Segue Numero Uno"]) {
        // do something here
    }
    

    That lets you take some sort of action depending on which segue is causing the transition. You can set the identifier for each segue in the storyboard editor.

    Update: Based on the code you provided in your comment (which I’ve added to your question), you’ve got the right idea now. At this point, it’s just a matter of good old fashioned debugging. Some things to check:

    • Is the view controller in your storyboard (i.e. the one that the segues in question lead to) set up as an instance of the class which implements this -prepareForSegue:sender:? Check the controller’s type in the storyboard.

    • Do the strings you use in your code exactly match the identifiers that you set for your segues in the storyboard? Capitalization, spelling, punctuation, and white space all count.

    • Is your -prepareForSegue:sender: method being called? Put a breakpoint there and debug. If it is being called, what is the identifier for the segue that’s passed in? If it’s not being called, the view controller in the storyboard doesn’t have the right class.

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

Sidebar

Related Questions

I have an iphone app. The view is consists of two children: a tableview
I have an iPhone app using a UINavigationController. On the fourth controller of the
I have an iPhone app that is based on a navigation controller. I have
I have this iPhone app that has an array containing around 50 to 100
I have an iPhone app that starts in a table view and goes to
I have a iphone app which is enable to receive push notifications. Currently i
I have a iPhone app which uses TabBar in Navigation controller. I have a
I have existing iphone app which is developed using XCode 4.2 and base sdk
I have an iPhone app that hides the status bar. However, my main view
I have an iphone app, with a view (well multiple but let's say one

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.