Obj-C or MonoTouch C# answers are fine.
The initial UIWindow’s RootViewController is a simple login screen.
window.RootViewController = loginScreen;
After login, I set the Root to the main app
window.RootViewController = theAppScreen;
How do I Fade-transition between the two RootViewControllers in this instance?
I might suggest a different approach that will get you your animation. Just go to the
theAppScreencontroller first, and if you need the user to log in, have it do thepresentViewControllerto get to theloginScreen(you don’t have to animate this step if you want it look like it went directly to the login screen). That way, when you’ve successfully logged in, the loginScreen can justdismissViewControllerAnimatedand you’ve got your animation back to the maintheAppScreen. (Obviously, if you want the fade effect, don’t forget to set the controller’smodalTransitionStyletoUIModalTransitionStyleCrossDissolve.)If you’re dead set on changing your
rootViewController, the only way I can think of doing it (and I don’t like it) would be to do something like:The first technique seems much cleaner to me.