I want to add a splash screen to a monotouch/xamarin project.
The splash screen should perform some logic and then navigate the user to one of two screens, logged in screen/Log in screen.
What is the correct way to do it in monotouch? (I am new to monotouch and IOS).
How i would do it, is something like this:
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