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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T15:37:44+00:00 2026-06-03T15:37:44+00:00

I am practicing delegate in iphone development but have a problem 2012-05-12 21:21:54.279 DelegatePractice[2924:f803]

  • 0

I am practicing delegate in iphone development but have a problem

2012-05-12 21:21:54.279 DelegatePractice[2924:f803] -[secondViewController viewControllers]: unrecognized selector sent to instance 0x6b61d10
2012-05-12 21:21:54.281 DelegatePractice[2924:f803] * Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘-[secondViewController viewControllers]: unrecognized selector sent to instance 0x6b61d10’
*
First throw call stack:
(0x13bb052 0x154cd0a 0x13bcced 0x1321f00 0x1321ce2 0x2596 0x436e1e 0x13bcec9 0x155c2 0x250d54 0x13bcec9 0x155c2 0x1555a 0xbab76 0xbb03f 0xba2fe 0x3aa30 0x3ac56 0x21384 0x14aa9 0x12a5fa9 0x138f1c5 0x12f4022 0x12f290a 0x12f1db4 0x12f1ccb 0x12a4879 0x12a493e 0x12a9b 0x1e98 0x1df5)

and I think I set up the delegate properly:

delegateViewController.m

- (void)secondViewControllerDidJump:
(secondViewController *)controller
{
    [self dismissViewControllerAnimated:YES completion:nil];
}

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
    if ([segue.identifier isEqualToString:@"jump"])
    {
        UINavigationController *navigationController = segue.destinationViewController;
        secondViewController *SecondViewController =[[navigationController viewControllers]objectAtIndex:0];
        SecondViewController.delegate = self;
    }
}

@end

secondViewController.h

@class secondViewController;

@protocol SecondViewControllerDelegate <NSObject>
- (void)secondViewControllerDidJump: (secondViewController *)controller;

@end

@interface secondViewController : UITableViewController

@property (strong,nonatomic) NSArray *choices;
@property (nonatomic, weak) id <SecondViewControllerDelegate> delegate;

- (IBAction)jump:(id)sender;

@end

secondViewController.m

- (IBAction)jump:(id)sender
{
    [self.delegate secondViewControllerDidJump:self];
}
  • 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-03T15:37:46+00:00Added an answer on June 3, 2026 at 3:37 pm

    Your app crashes in these lines:

    UINavigationController *navigationController = segue.destinationViewController;
    secondViewController *SecondViewController =[[navigationController viewControllers]objectAtIndex:0];
    

    You ask navigationController for its viewControllers, but the log makes clear that navigationController is not a UINavigationController but a secondViewController, which does not respond to the selector -viewControllers.

    Make sure that segue.destinationViewController really returns a UINavigationController.

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

Sidebar

Related Questions

I was practicing the dynamic programming problem on SPOJ. But I have no idea
I am practicing with PHP and AJAX but I have some problems! I'm trying
I'm practicing my Rails development skills by building an app that will have different
I am practicing DOM Scripting (no real-life problem but rather practice and theory, I
I have been practicing TDD and (some) XP for a few years now and
I have been practicing TDD in C# for several years now and recently have
I've been practicing for an upcoming programming competition and I have stumbled across a
I was practicing SRM Problems in Topcoder.I came across this problem Problem Statement: Today
I'm practicing writing MVC applications. I have a Mastermind game, that I would like
Been practicing with those system calls, but I stucked into this code: #include <stdio.h>

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.