Reputation: 207
My app is a 5 tabviewcontroller app.
I want to build a first run set up routine that will collect info from the user in five steps (5 UIViews).
This GUI should hide my entire application GUI during the set up, in a similar way that happens when you restore an iPhone and have it set up for wi-fi, iCloud, etc...
I am trying
[self presentViewController:firstRunSetUp_1_ViewController animated:YES completion:NULL]
But this does not allow me to push the following view controllers.
UPDATE:
This is my code in appDidFinishLauching in appDelegate:
BHfirstRunSetUp_1_ViewController *f = [[BHfirstRunSetUp_1_ViewController alloc]init];
[self.myTabBarController.selectedViewController presentViewController:f animated:NO completion:NULL];
This is code inside "nextButtonClicked" IBAction, inside the BHfirstRunSetUp_1:
-(IBAction)nextButtonClicked:(id)sender
{
NSLog(@"inside nextButton clicked...");
// initialize second view controller:
if (firstRunSetUp_2_ViewController == nil) {
firstRunSetUp_2_ViewController = [[BHfirstRunSepUp_2_ViewController alloc]init];
}
[self.navigationController pushViewController:firstRunSetUp_2_ViewController animated:YES];
}
I have these lines in console:
2013-08-01 20:20:33.106 iNota[3245:907] inside nextButton clicked...
But the view isn't pushed!
Here is a screen shot:
http://www.idanfe.com/images/1.png "screenshot"
+++ UPDATE 2 ++++
I have taken Apple's Tabster example and changed it, adding my lines. You find a copy here:
http://www.idanfe.com/sample/Tabster.zip "Tabster"
Upvotes: 0
Views: 180
Reputation: 104082
If I understand what you're asking for, just present a navigation controller in the first step, which will show the root view controller of that navigate controller. Then push to your other 4 setup controllers. When you're done, dismiss the navigation controller.
Upvotes: 0
Reputation: 179
You can push them into section using as a modal view, but suggestion is to use uinavigationviewcontroller which is a rootviewcontroller in window ( in app delegate ).
Upvotes: 0
Reputation: 1724
Push a UINavigationController. eg:
UINavigationController * navigationController = [[UINavigationController alloc] initWithRootViewController:firstRunSetUp_1_ViewController];
[self presentViewController:navigationController animated:YES completion:NULL];
Upvotes: 2