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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:37:44+00:00 2026-06-15T23:37:44+00:00

I hope someone can help with this. I have a UITableViewController and want to

  • 0

I hope someone can help with this.

I have a UITableViewController and want to pass a value to a UIViewController called NewsArticleViewController when the tablecell is selected. I’ve created a segue from the tablecell to the view controller.

When I call my prepareForSegue method below:

-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
    if([[segue identifier] isEqualToString:@"ShowNewsArticle"])
    {
        NSIndexPath *indexPath = [self._tableView indexPathForSelectedRow];
        NSDictionary *article = [_articles objectAtIndex:indexPath.row];
        NSString *articleID = [article valueForKey:@"id"];
        NSLog(@"Trying %@", articleID);

        NewsArticleViewController *detailViewController = [segue destinationViewController];
        detailViewController.articleID = articleID;
    }
}

The NSLog shows the NSString value correctly before the error occurs on the last line.

I get the error:

2012-12-11 23:08:41.915 My School[4689:c07] -[UIViewController setArticleID:]: unrecognized selector sent to instance 0x8088140
2012-12-11 23:08:41.916 My School[4689:c07] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIViewController setArticleID:]: unrecognized selector sent to instance 0x8088140'
*** First throw call stack:
(0x1800012 0x11c5e7e 0x188b4bd 0x17efbbc 0x17ef94e 0x3ca1 0x554ac7 0x554b54 0x1bc899 0x1bcb3d 0xbc3e83 0x17bf376 0x17bee06 0x17a6a82 0x17a5f44 0x17a5e1b 0x1cc87e3 0x1cc8668 0x10d65c 0x1f4d 0x1e75 0x1)
libc++abi.dylib: terminate called throwing an exception

On the destination view controller, NewsArticleViewController, I have declared this in the header:

@property(strong,nonatomic) id articleID;

And I have synthesized the property in the method. I’m using ARC, I don’t know if this is the specific cause but I can’t proceed until I sort this out. Thanks.

  • 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-15T23:37:45+00:00Added an answer on June 15, 2026 at 11:37 pm

    In your error message, UIViewController is reporting the “unrecognized selector” error. I suspect your storyboard has not specified your custom NewsArticleViewController for this scene. Thus, it’s using the default UIViewController which obviously doesn’t understand the setArticleID.

    Check the “Custom Class” setting for the view controller in Interface Builder:

    enter image description here

    If the custom class has not specified, it will look like the above screen snapshot. Just fill in the class name.

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

Sidebar

Related Questions

I hope someone can help me with this Javascript. I have an Object called
Hope someone can help me with this.. I have a magento store up&running, via
I really hope someone can help on this because I'm learning cocoa and have
I hope someone can help with this. I have created a map app that
I hope someone can help me with this one. I want to take an
I really hope someone can help me with this. Basically i have an issue
I hope someone can help me with the following... I have this code below
I hope someone can help with this issue. I have a popup iframe using
I really hope someone can help with this problem. I have an ajax pagination
I couldn't find a solution for this yet...hope someone can help me. I have

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.