Comment puis-je debug "méconnu sélecteur envoyé à l'instance" erreur

Je suis entrain de créer un tableau personnalisé vue sur les cellules de mon tableau. Après je connecter un affichage de l'image de cellule personnalisé (dans le scénario) de mon code swift, j'obtiens l'erreur suivante.

[UITableViewCellContentView image]: unrecognized selector sent to instance 0x7fb4fad7fd20'
*** First throw call stack:
(
0   CoreFoundation                      0x000000010ccbb3f5 __exceptionPreprocess + 165
1   libobjc.A.dylib                     0x000000010e7e9bb7 objc_exception_throw + 45
2   CoreFoundation                      0x000000010ccc250d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3   CoreFoundation                      0x000000010cc1a7fc ___forwarding___ + 988
4   CoreFoundation                      0x000000010cc1a398 _CF_forwarding_prep_0 + 120
5   UIKit                               0x000000010d7d8881 -[UITableViewCell _marginWidth] + 151
6   UIKit                               0x000000010d7ca23d -[UITableViewCell _separatorFrame] + 70
7   UIKit                               0x000000010d7ca6fa -[UITableViewCell _updateSeparatorContent] + 360
8   UIKit                               0x000000010d7d4e85 -[UITableViewCell _setSectionLocation:animated:forceBackgroundSetup:] + 1174
9   UIKit                               0x000000010d634ea8 __53-[UITableView _configureCellForDisplay:forIndexPath:]_block_invoke + 1822
10  UIKit                               0x000000010d5b5eae +[UIView(Animation) performWithoutAnimation:] + 65
11  UIKit                               0x000000010d63477b -[UITableView _configureCellForDisplay:forIndexPath:] + 312
12  UIKit                               0x000000010d63bcec -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 533
13  UIKit                               0x000000010d61b7f1 -[UITableView _updateVisibleCellsNow:isRecursive:] + 2846
14  UIKit                               0x000000010d63165c -[UITableView layoutSubviews] + 213
15  UIKit                               0x000000010d5be199 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 521
16  QuartzCore                          0x00000001114b6f98 -[CALayer layoutSublayers] + 150
17  QuartzCore                          0x00000001114abbbe _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 380
18  QuartzCore                          0x00000001114aba2e _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
19  QuartzCore                          0x0000000111419ade _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 242
20  QuartzCore                          0x000000011141abea _ZN2CA11Transaction6commitEv + 390
21  QuartzCore                          0x000000011141b255 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 89
22  CoreFoundation                      0x000000010cbf0347 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
23  CoreFoundation                      0x000000010cbf02a0 __CFRunLoopDoObservers + 368
24  CoreFoundation                      0x000000010cbe60d3 __CFRunLoopRun + 1123
25  CoreFoundation                      0x000000010cbe5a06 CFRunLoopRunSpecific + 470
26  GraphicsServices                    0x0000000110daa9f0 GSEventRunModal + 161
27  UIKit                               0x000000010d545550 UIApplicationMain + 1282
28  TestWork                          0x000000010caa432e top_level_code + 78
29  TestWork                          0x000000010caa436a main + 42
30  libdyld.dylib                       0x000000010efc3145 start + 1
31  ???                                 0x0000000000000001 0x0 + 1
)

Pouvez-vous svp me dire comment faire pour résoudre cette erreur?

Merci.

- Je ajouter une exception point d'arrêt dans mon projet.

C'est la ligne où il se casse.

  override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let cell = self.tableView.dequeueReusableCellWithIdentifier(kCellIdentifier) as ItemTableViewCell  <---------------

Mais je n'utilise pas d '"image" dans mon code.

  • vous appelez image] quelque part.. mais sur le mauvais objet. la première ligne de l'erreur vous indique que beaucoup
  • Cesser de l'appeler [image] sur UITableViewCellContentView - que serait-il fixer. Nous montrer le code qui est à l'origine de ce crash.
  • Je pense que vous avez utilisé une partie de l'image dans tableViewCell mais que l'image peut ne pas être dans votre bundle.
InformationsquelleAutor n179911 | 2014-09-15