View Controller Question
Posted
by user341444
on Stack Overflow
See other posts from Stack Overflow
or by user341444
Published on 2010-05-14T16:57:16Z
Indexed on
2010/05/14
17:04 UTC
Read the original article
Hit count: 173
First off I'm new at programming. I'm creating an app with one navigation bar controller. The app is pretty basic except for a quiz section that is comprised of 12 xibs. As the users takes the quiz a new xib is pushed onto the stack. I want to create a button that takes the user back to the home screen if they do not want to complete the quiz. The back button takes them to the previous xib which could be 11 deep. Is it possible to dismiss the modal views and reload the rootView controller?
Here's the code from my delegate
@synthesize window; @synthesize navigationController;
(void)applicationDidFinishLaunching:(UIApplication *)application {
// Override point for customization after application launch [window addSubview:[navigationController view]]; [window makeKeyAndVisible]; }
(void)dealloc { [window release]; [navigationController release]; [super dealloc]; }
This is how I'm pushing new xibs onto the stack
(IBAction) showTesting: (id)sender { Testing *varTesting = [[[Testing alloc] initWithNibName:@"Testing" bundle:nil] autorelease]; [[self navigationController] pushViewController:varTesting animated: YES]; }
Any help would be greatly appreciated. Thanks
© Stack Overflow or respective owner