[英]How can i switch the main view controller ios5?
I want to implement authorization for my application. 我想为我的应用程序实现授权。 If the authorization function returns yes, i want to switch my main view controller and assign my second view controller as initial view controller.
如果授权功能返回是,我想切换我的主视图控制器并将第二个视图控制器分配为初始视图控制器。 I don't want to see authorization view any more after the function returns yes.
函数返回yes后,我不再希望看到授权视图。 What should i try?
我该怎么办?
Like transitionFromViewController or not? 是否喜欢transitionFromViewController?
Just load the main view controller and if you need to authenticate present a modal view over the view controller 只需加载主视图控制器,如果您需要进行身份验证,则可以在视图控制器上显示一个模式视图
[self presentModalViewController:myLoginViewController animated:NO];
or 要么
[self presentViewController:myLogingViewController animated:NO completion:NULL];
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.