J'essaie de faire une "liste d'articles" -> "détails de l'article" d'une sorte d'application. J'ai réussi à faire la partie de la liste très bien jusqu'à présent. J'ai également créé une nouvelle vue pour les détails de l'article, mais j'ai une erreur lorsque je clique sur l'élément dont je veux voir les détails. Jusqu'à présent, la nouvelle vue n'a qu'une étiquette vide indiquant "View Changed: OK". Rien d'autre. ItemDetailsView est une vue qui hérite de UIViewController.pushViewController échouant
Pour créer cette vue, je suis allé à New File -> Cocoa Touch -> sous-classe UIViewController.
L'erreur que je reçois est un « signabrt » lorsque je tente d'exécuter la ligne ci-dessous // erreur ICI
suit Voici le message complet:
2011-10-02 17:26:03.582 Teste Data Nav[10035:b303] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </Users/leo/Library/Application Support/iPhone Simulator/4.3.2/Applications/FA60D1E7-1B98-4943-98AA-C86A2339AC3E/Teste Data Nav.app> (loaded)' with name 'DetailView''
*** Call stack at first throw:
(
0 CoreFoundation 0x00dc25a9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x00f16313 objc_exception_throw + 44
2 CoreFoundation 0x00d7aef8 +[NSException raise:format:arguments:] + 136
3 CoreFoundation 0x00d7ae6a +[NSException raise:format:] + 58
4 UIKit 0x0020f0fa -[UINib instantiateWithOwner:options:] + 2024
5 UIKit 0x00210ab7 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 168
6 UIKit 0x000c6628 -[UIViewController _loadViewFromNibNamed:bundle:] + 70
7 UIKit 0x000c4134 -[UIViewController loadView] + 120
8 UIKit 0x000c400e -[UIViewController view] + 56
9 UIKit 0x000c2482 -[UIViewController contentScrollView] + 42
10 UIKit 0x000d2f25 -[UINavigationController _computeAndApplyScrollContentInsetDeltaForViewController:] + 48
11 UIKit 0x000d1555 -[UINavigationController _layoutViewController:] + 43
12 UIKit 0x000d27aa -[UINavigationController _startTransition:fromViewController:toViewController:] + 326
13 UIKit 0x000cd32a -[UINavigationController _startDeferredTransitionIfNeeded] + 266
14 UIKit 0x000d4562 -[UINavigationController pushViewController:transition:forceImmediate:] + 932
15 UIKit 0x000cd1c4 -[UINavigationController pushViewController:animated:] + 62
16 Teste Data Nav 0x00002d4c -[RootViewController tableView:didSelectRowAtIndexPath:] + 220
17 UIKit 0x0008bb68 -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] + 1140
18 UIKit 0x00081b05 -[UITableView _userSelectRowAtPendingSelectionIndexPath:] + 219
19 Foundation 0x0079b79e __NSFireDelayedPerform + 441
20 CoreFoundation 0x00da38c3 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 19
21 CoreFoundation 0x00da4e74 __CFRunLoopDoTimer + 1220
22 CoreFoundation 0x00d012c9 __CFRunLoopRun + 1817
23 CoreFoundation 0x00d00840 CFRunLoopRunSpecific + 208
24 CoreFoundation 0x00d00761 CFRunLoopRunInMode + 97
25 GraphicsServices 0x00ffa1c4 GSEventRunModal + 217
26 GraphicsServices 0x00ffa289 GSEventRun + 115
27 UIKit 0x00022c93 UIApplicationMain + 1160
28 Teste Data Nav 0x000023b9 main + 121
29 Teste Data Nav 0x00002335 start + 53
)
terminate called throwing an exceptionCurrent language: auto; currently objective-c
Avez-vous correctement attribué UINavigationController dans IB ou ailleurs? – Vanya
Je n'ai pas affecté UINavigationController ... – Leonardo
puisque vous utilisez des fichiers nib, je suppose que vous devriez en avoir un défini au moins dans IB. – Vanya