1

I have a strange problem with my segue, which is causing my app to crash. The app crashes in ListViewController.m at line 33:

dvc.menu = [self.blogPosts objectAtIndex:[[self.tableView indexPathForSelectedRow] row]];

With the following error:

menu[15782:c07] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<DetailViewController 0x7576d50> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key textView.'*

I have been researching for a very long time now, and it seems that many experience the same problem, although their solutions doesn't seem to work for me. This is a whole new world for me, and I'd really like to know, what exactly I am doing wrong.

I have uploaded the XCode project for you to look at, if it is to any help. Download project files here

Thanks in advance!

FooBar
  • 5,752
  • 10
  • 44
  • 93
  • possible duplicate of [This class is not key value coding-compliant for the key](http://stackoverflow.com/questions/3088059/this-class-is-not-key-value-coding-compliant-for-the-key) – CodaFi May 28 '13 at 09:46
  • Hi CodaFi! Thanks for you code, however, I have already looked at the specific thread. – FooBar May 28 '13 at 12:37

2 Answers2

5

In your storyboard, your detail text view should be linked with a property named textView inside your detail controller header file.

In the header file, however, you have a contentView property (not textView). So, you have to delete the textView link from your storyboard (right click on the text view and click on the X button on the referencing outlet) and link the text view with the correct outlet (contentView)

LombaX
  • 17,265
  • 5
  • 52
  • 77
0

Could not download your project. If variable "dvc" is a instance of DetailViewController, you need to check if "menu" has get/set or not.

nahung89
  • 7,745
  • 3
  • 38
  • 40