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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:01:28+00:00 2026-06-17T09:01:28+00:00

Skip the following These values are the first three lines of a TVC didSelectRowAtIndexPath

  • 0

Skip the following

These values are the first three lines of a TVC didSelectRowAtIndexPath method which is giving me all kinds of exceptions when I select an item in a row.

How do I:

a. Check that the below dictionary, array and selectedCategory have values.

b. Ensure that they do if they turn out not to?

NSDictionary *dictionary = [listOfItems objectAtIndex:indexPath.section];
NSArray *array = [dictionary objectForKey:@"News"];
NSString *selectedCategory = [array objectAtIndex:indexPath.row];

To here :

Exception from UIView tableView:numberOfRowsInSection:]: unrecognized selector sent to instance 0x7193a60

  • 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-17T09:01:29+00:00Added an answer on June 17, 2026 at 9:01 am

    Here is a simple adjustment. There are normally better ways to store data than nesting all these data collections, but this is a simple drop in replacement for what you have already that should stop the crashes.

    // First check your listOfItems
    NSDictionary *dictionary = NULL;
    if (listOfItems.count > indexPath.section) {
        dictionary = [listOfItems objectAtIndex:indexPath.section];
    }
    
    // Next check your dictionary isn't null.
    NSArray *array = NULL;
    if (dictionary) {
        array = [dictionary objectForKey:@"News"];
    }
    
    // Next check your array and make sure your array has values.
    NSString *selectedCategory = NULL;
    if (array.count > indexPath.row) {
       selectedCategory = [array objectAtIndex:indexPath.row];
    }
    
    // Finally do your stuff
    if (selectedCategory) {
        // Do your stuff
    } else {
        // Something went wrong along the way and you don't have a selectedCategory string.
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code (calling a method returning IEnumerable): FibonacciWithLinq.Skip(delegate() { return 5;
How can i skip first argument without giving any value in function call,so that
I have the following values for example: 0 0 0 1 3 2 These
I have a flat file with the following structure (first 3 lines are information
I have the following method for looping through a table, changint some values in
Is it possible to skip the whole action method execution and return a specific
my requirement is to read all rows of an excel-sheet in first column that
I got the following function, that loops through all table th s and builds
I just fixed a bug in the following lines of PHP: $value = 1091.09;
I have the following pattern; AA(AA)–NBXXYYY–CCCCCCC(CC)–DD(D) Where the values in brackets are optional and

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.