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
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.