andreamazz / SlideOutNavigation

SlideOut Navigation Controller for iOS.
MIT License
210 stars 49 forks source link

change the first view controller presented #81

Open tharrington opened 10 years ago

tharrington commented 10 years ago

I am about to display my slideout view controller, but I want to display controller at index 3 if the user has never used the app before. Before i present the navigation controller, I tried using this method:

so my code looked like this

// initiate controllers [slideoutController switchToControllerTagged:3 andPerformSelector:nil withObject:nil]; [self.navigationController pushViewController:slideoutController animated:YES];

andreamazz commented 10 years ago

You forgot the question. Anyhoo, pushing the slideout controller in a navcontroller is far from being a good practice, since the slideout controller itself hosts a navigation controller.

tharrington commented 10 years ago

alright, so say i am in view controller A and i do this instead:

[self presentViewController:slideoutController animated:YES completion:nil];

then in one of the view controllers contained by the slideout controller i want to pop off the slideout controller and go back to view controller A... how can i do that? that is why i was presenting it as a nav in the first place.

drallgood commented 10 years ago

Am I guessing correctly that only part of your app is using the slideout view? You could always use the slideoutVC in the background (hiding the navbar) when you're not using it.

That's what I did anyway.

chrux commented 9 years ago

Try with this startingControllerTag, I think this should help to indicate what option is shown first.

Best