0

I'm new to swift and have been experimenting with basic tableviews.

I have built a simple app that has a table cell with an icon image and two labels, but I am getting a persistent error when I try to run it and I can't seem to find the solution.

2016-01-24 00:45:55.198 xxxAppNamexxx[15608:5747278] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<xxxAppNamexxx.ItemTableViewCell 0x7ff4f1f3e160> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key sourceIcon.'
*** First throw call stack:
(
    0   CoreFoundation                      0x00000001079fcf45 __exceptionPreprocess + 165
    1   libobjc.A.dylib                     0x0000000109720deb objc_exception_throw + 48
    2   CoreFoundation                      0x00000001079fcb89 -[NSException raise] + 9
    3   Foundation                          0x0000000107dc5a6b -[NSObject(NSKeyValueCoding) setValue:forKey:] + 288
    4   UIKit                               0x00000001082cd96f -[UIView(CALayerDelegate) setValue:forKey:] + 173
    5   UIKit                               0x00000001085d1a71 -[UIRuntimeOutletConnection connect] + 109
    6   CoreFoundation                      0x000000010793da80 -[NSArray makeObjectsPerformSelector:] + 224
    7   UIKit                               0x00000001085d0454 -[UINib instantiateWithOwner:options:] + 1864
    8   UIKit                               0x000000010835c177 -[UITableView _dequeueReusable
Beau Nouvelle
  • 6,962
  • 3
  • 39
  • 54
  • It's going to be hard to understand the problem without more code. if you can share code to your project perhaps or maybe a link to it or something. This is a generic error message. – Unis Barakat Jan 24 '16 at 06:53
  • 1
    Your storyboard has a reference to an IBOutlet called "sourceIcon" but the outlet wasn't implemented in the class – Paulw11 Jan 24 '16 at 07:11
  • @Paulw11 You were dead on. Thanks man. – itchyspacesuit Jan 24 '16 at 07:29
  • Possible duplicate of [What does this mean? "'NSUnknownKeyException', reason: ... This class is not key value coding-compliant for the key X"](http://stackoverflow.com/questions/3088059/what-does-this-mean-nsunknownkeyexception-reason-this-class-is-not-key) – jtbandes Jan 24 '16 at 08:40

0 Answers0