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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T20:27:02+00:00 2026-06-02T20:27:02+00:00

I want to pass information between ViewControllers using Storyboard, but I get an error…

  • 0

I want to pass information between ViewControllers using Storyboard, but I get an error… my code is as follows

- (void) prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
    if([[segue identifier] isEqualToString:@"ToAssistance"])
    {
        NSLog(@"To assistance");
    }
    else if([[segue identifier] isEqualToString:@"ToMap"])
    {
        UINavigationController * navController = (UINavigationController *)[segue destinationViewController];
        EventMapViewController * eventMapViewController = (EventMapViewController *)[navController topViewController];
    }
}

But at line

EventMapViewController * eventMapViewController = (EventMapViewController *)[navController topViewController];

I get the following exception

2012-04-23 19:49:00.369 StoryboardAssistance[9916:11603]
-[EventMapViewController topViewController]: unrecognized selector sent to instance 0x6e86380 2012-04-23 19:49:00.370 StoryboardAssistance[9916:11603] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[EventMapViewController topViewController]: unrecognized selector sent to instance 0x6e86380'
*** First throw call stack: (0x135b022 0x2037cd6 0x135ccbd 0x12c1ed0 0x12c1cb2 0x546a 0x5424be 0x135ce99 0x11a14e 0x11a0e6 0x1c0ade 0x1c0fa7 0x1c0266 0x13f3c0 0x13f5e6 0x125dc4 0x119634 0x15fdef5 0x132f195 0x1293ff2 0x12928da 0x1291d84 0x1291c9b 0x15fc7d8 0x15fc88a 0x117626 0x218d 0x20f5) terminate called throwing an exception(lldb)

Any suggestions?

  • 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-02T20:27:04+00:00Added an answer on June 2, 2026 at 8:27 pm

    According to your exception it seems that you are asking the “eventMapViewController” for its topviewontroller, which clearly doesnt exists since it is not a navigation controller. IF you check where you ask for it you can see here

    [navController topViewController];
    

    that navcontroller is in fact a controller of type “EventMapViewController”, which would mean that this

    UINavigationController * navController = (UINavigationController *)[segue destinationViewController];
    

    is not giving you a uinavigationcontroller but in fact the “EventMapViewController” you want. so just remove those 2 lines and add

    EventMapViewController * eventMapViewController = (EventMapViewController *)[segue destinationViewController];
    

    if this doesnt work, then please comment this line

    EventMapViewController * eventMapViewController = (EventMapViewController *)[navController topViewController];
    

    and add a

    NSLog(@"%@",navController);
    

    and tell me the output.

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

Sidebar

Related Questions

I want to pass information like number between two views in navigation controller. But
I'm playing with the flickr api and php. I want to pass some information
I want to pass the id from one action to the next action, but
I want to pass data from client side to server-side. I am using jQuery
I want to pass an IEnumerable collection from view to controller using JQuery from
I'm using Javascript's mouse event to pass information about mouse position to flash and
I am looking for a better way to pass information between my Firefox extension
How I can parameterize to pass information between shared_example/include_examples? In my specific case, I
I want to pass information from an HTML form to a PHP page. My
I want to pass complex information into a control. The equivalent of an entire

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.