我想向 monotouch/xamarin 项目添加启动画面。
初始屏幕应该执行一些逻辑,然后将用户导航到两个屏幕之一,登录屏幕/登录屏幕。
在monotouch中正确的方法是什么?(我是 monotouch 和 IOS 的新手)。
我想向 monotouch/xamarin 项目添加启动画面。
初始屏幕应该执行一些逻辑,然后将用户导航到两个屏幕之一,登录屏幕/登录屏幕。
在monotouch中正确的方法是什么?(我是 monotouch 和 IOS 的新手)。
我会怎么做,是这样的:
例子:
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