0

I am new to iOS and trying to make my own simple app. I have an add button in a master view controller that i want to load a table view controller embedded in a navigation controller. I did a control-drag from the add button to the navigation controller, but when I run the app the add button crashes with the following call stack:

BookMaker[5367:11303] Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key titleInpur.' *** First throw call stack: lots of hex values here.... libc++abi.dylib: terminate called throwing an exception

If I toggle exception break points, I get this error: (lldb)

I did a search thru my code and could not find titleInpur anywhere.

Debugging so far:

Community
  • 1
  • 1
bernie2436
  • 22,841
  • 49
  • 151
  • 244
  • Check your storyboard. It's probably referenced in the segue there or in your new scene somewhere. – Rob Oct 27 '12 at 23:47
  • @Rob how do i "check my storyboard?" I've just barely got my feet wet in ios. – bernie2436 Oct 27 '12 at 23:47
  • 1
    @rob thanks for your help. it is an issue with the add scene somewhere. i can setup a modal segue for a blank scene/nav controller and the app runs fine – bernie2436 Oct 28 '12 at 00:04

1 Answers1

2

Check your storyboard. It's probably referenced in the segue there or in your new scene somewhere.

The intuitive way is to just click on the storyboard in the navigation panel to open up the graphical representation of the storyboard, open up the identity inspector (e.g., option+command+3 in Xcode 4.5) and select the segue or the various controllers/views/subviews that make up the next scene, and examine the contents of the identity inspector while you do that, until you find some reference to this class.

Or, alternatively, rather than looking at the graphical representation of your storyboard, you can right click on the name of the storyboard in the navigation panel on the left, select "Open As" - "Source code" and then search for the class in question (which will show you precisely where that class occurs in the storyboard ... I would serious advise against actually editing the storyboard here, but just identify where the class is referenced, and immediately go back to "Open As" - "Interface Builder/Storyboard", and edit your storyboard in Interface Builder).

Rob
  • 415,655
  • 72
  • 787
  • 1,044
  • Thanks so much! Opening the storyboard as source and doing a simple search took me right to the misspelled output. I fixed the spelling and the app works properly. – bernie2436 Oct 28 '12 at 00:13