How i would do it, is something like this:
- Set your splash screen as the rootviewcontroller, do your logic in the background, and start to check if the user is logged in or not.
- Then on the async complete call, navigate the user to either logged in screen and set that as the new rootviewcontroller in a navigationcontroller. If the user is not logged in, push a topviewcontroller on top of the loggedinscreen - remember to check if the user is logged in or not, before you start loading user specific data in the logged in screen.
Example:
MySplashController splash;
Navigationcontroller nav;
UIViewController masterviewcontroller;
Public override void FinishedLaunching(UIApplication app, NSDictionary options){
splash = new MySplashController();
window.rootviewcontroller = splash;
window.makekeyandvisible();
}
void MyAsyncLoggedInCall(bool loggedin){
if(loggedin)
LoggedIn();
else
LogOn();
}
void LoggedIn(){
masterviewcontroller = MyLoggedInScreen();
nav = new navigationcontroller(masterviewcontroller);
window.rootviewcontroller = nav;
}
void LogOn(){
masterviewcontroller = MyLoggedInScreen();
nav = new navigationcontroller(masterviewcontroller);
window.rootviewcontroller = nav;
nav.TopViewController.PresentModalViewController(new MyLogInScreen(),false);
}
This is just one of the ways to do it. You can also look at how to implement the facebook login functions, and do something like that in your application, as its quite similar to your problem. Monotouch bindings