我正在使用Xamarin.iOS的故事板.DashboardViewController(一个UINavigationController)被设置为故事板中的初始视图.但是,在我的AppDelegate类中,FinishedLaunching方法有条件地检查用户是否需要在应用程序启动时登录.如果是这样,它会将"ViewController"(登录控制器)设置为RootViewController,否则它将实例化由故事板设置的初始视图控制器,即"DashboardViewController".这是FinishedLaunching方法的代码.
public override bool FinishedLaunching (UIApplication application, NSDictionary launchOptions)
{
// Override point for customization after application launch.
// If not required for your application you can safely delete this method
Window = new UIWindow(UIScreen.MainScreen.Bounds);
var storyboard = UIStoryboard.FromName("Main", NSBundle.MainBundle);
bool isLoggedOut = true;
UIViewController rootViewController;
if (isLoggedOut)
rootViewController = (UIViewController)storyboard.InstantiateViewController("ViewController");
else
rootViewController = (UIViewController)storyboard.InstantiateInitialViewController();
Window.RootViewController = rootViewController;
Window.MakeKeyAndVisible();
}
Run Code Online (Sandbox Code Playgroud)
验证用户的凭据后,以下代码会尝试将RootViewController再次设置回原始的"DashboardViewController"并显示该视图.这是从登录控制器完成的.
partial void LoginBtn_TouchUpInside (UIButton sender)
{
var appDelegate = UIApplication.SharedApplication.Delegate as AppDelegate;
appDelegate.SetRootViewController (dashboardViewController, true);
this.PresentViewController (dashboardViewController, true, null); …Run Code Online (Sandbox Code Playgroud) 我最近将我的 Azure 网站扩展到标准实例。Azure 的标准定价层表示,它附带“免费包含 5 个 SNI SSL 和 1 个 IP SSL”。我想使用这些所谓的“证书”之一设置 SSL 绑定到我的自定义域。但是,我在 Azure 门户上找不到任何指向这些证书之一的内容。唯一的选择是上传证书。我认为 Azure 在标准模式下包含或提供这些证书是错误的吗?还是“免费包含 5 个 SNI SSL 和 1 个 IP SSL”意味着“SSL 插槽”,但您仍然需要购买证书?