While my application launches like normal and has no errors, when I attempt to click a button to show another view, the application closes.
On the debugger console, this is the the display:
"SEM2REDO[13487:b603] Application tried to push a nil view controller on target <UINavigationController: 0x4ea5be0>"
then the second time you click it, this appears, and then the application cancels.
2012-01-24 11:46:37.549 SEM2REDO[13591:b603] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </Users/margueriteoquinn/Library/Application Support/iPhone Simulator/4.3/Applications/F2B86CC5-C700-414E-9030-17E94535EB1A/SEM2REDO.app> (loaded)' with name 'SelectView''
*** Call stack at first throw:
(
0 CoreFoundation 0x00dc95a9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x00f1d313 objc_exception_throw + 44
2 CoreFoundation 0x00d81ef8 +[NSException raise:format:arguments:] + 136
3 CoreFoundation 0x00d81e6a +[NSException raise:format:] + 58
4 UIKit 0x004b40fa -[UINib instantiateWithOwner:options:] + 2024
5 UIKit 0x004b5ab7 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 168
6 UIKit 0x0036b628 -[UIViewController _loadViewFromNibNamed:bundle:] + 70
7 UIKit 0x00369134 -[UIViewController loadView] + 120
8 UIKit 0x0036900e -[UIViewController view] + 56
9 UIKit 0x00367482 -[UIViewController contentScrollView] + 42
10 UIKit 0x00377f25 -[UINavigationController _computeAndApplyScrollContentInsetDeltaForViewController:] + 48
11 UIKit 0x00376555 -[UINavigationController _layoutViewController:] + 43
12 UIKit 0x00377870 -[UINavigationController _startTransition:fromViewController:toViewController:] + 524
13 UIKit 0x0037232a -[UINavigationController _startDeferredTransitionIfNeeded] + 266
14 UIKit 0x00379562 -[UINavigationController pushViewController:transition:forceImmediate:] + 932
15 UIKit 0x003721c4 -[UINavigationController pushViewController:animated:] + 62
16 SEM2REDO 0x00002590 -[SEM2REDOViewController chooseFirstMeeting:] + 252
17 UIKit 0x002b94fd -[UIApplication sendAction:to:from:forEvent:] + 119
18 UIKit 0x00349799 -[UIControl sendAction:to:forEvent:] + 67
19 UIKit 0x0034bc2b -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 527
20 UIKit 0x0034a7d8 -[UIControl touchesEnded:withEvent:] + 458
21 UIKit 0x002ddded -[UIWindow _sendTouchesForEvent:] + 567
22 UIKit 0x002bec37 -[UIApplication sendEvent:] + 447
23 UIKit 0x002c3f2e _UIApplicationHandleEvent + 7576
24 GraphicsServices 0x01721992 PurpleEventCallback + 1550
25 CoreFoundation 0x00daa944 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
26 CoreFoundation 0x00d0acf7 __CFRunLoopDoSource1 + 215
27 CoreFoundation 0x00d07f83 __CFRunLoopRun + 979
28 CoreFoundation 0x00d07840 CFRunLoopRunSpecific + 208
29 CoreFoundation 0x00d07761 CFRunLoopRunInMode + 97
30 GraphicsServices 0x017201c4 GSEventRunModal + 217
31 GraphicsServices 0x01720289 GSEventRun + 115
32 UIKit 0x002c7c93 UIApplicationMain + 1160
33 SEM2REDO 0x00001a70 main + 102
34 SEM2REDO 0x00001a01 start + 53
)
terminate called throwing an exception
I have no idea what this means, but I really need some help. Here is some helpful delegate method that I have implemented
@synthesize window;
@synthesize navController;
#pragma mark -
#pragma mark Application lifecycle
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[self.window makeKeyAndVisible];
SEM2REDOViewController *firstController = [[SEM2REDOViewController alloc]
initWithNibName:@"SEM2REDOViewController" bundle:nil];
UINavigationController *navigationController = [[UINavigationController alloc]
initWithRootViewController:firstController];
[self setNavController:navigationController];
[window addSubview:[navigationController view]];
[navigationController release];
[firstController release];
return YES;
}
and this is the method in my SEM2REDOViewController to display the second view
- (IBAction)chooseFirstMeeting:(id)sender {
SelectRotationController *selectView = [[SelectRotationController alloc]
initWithNibName:@"SelectView" bundle:[NSBundle mainBundle]];
[selectView.navigationItem setTitle:@"Select First Meeting"];
[self.navigationController pushViewController:self.selectRotationController animated:YES];
self.selectRotationController = selectView;
[selectView release];
}
I’m sorry if this is an easy question: I am a highschooler attempting to do an independent study on programming so ANY help is much appreciated.
Change it to
This will do solve your issue..if you have any problem understanding something let me know.