public static void SetController(Style style, string type, string orient) { m_style = style; UIViewController controller = null; switch (m_style) { case Style.TABS: controller = new iOSApp(); // This is a UITabBarController. break; case Style.NAVI: controller = new UINavigationController(); break; case Style.PAGE: controller = new UIPageViewController(type == "scroll" ? UIPageViewControllerTransitionStyle.Scroll : UIPageViewControllerTransitionStyle.PageCurl, orient == "horizontal" ? UIPageViewControllerNavigationOrientation.Horizontal : UIPageViewControllerNavigationOrientation.Vertical); break; } MainWindow.RootViewController = controller; MainWindow.MakeKeyAndVisible(); m_view = MainWindow.RootViewController.View; }
public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions) { MainWindow = Window = new UIWindow(UIScreen.MainScreen.Bounds); m_viewController = new iOSApp(); Window.RootViewController = m_viewController; Window.MakeKeyAndVisible(); m_view = Window.RootViewController.View; m_view.BackgroundColor = UIColor.White; // Will execute the CSCS script: m_viewController.Run(); m_view.AutoresizingMask = UIViewAutoresizing.All; return(true); }
public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions) { MainWindow = Window = new UIWindow(UIScreen.MainScreen.Bounds); m_viewController = new iOSApp(); Window.RootViewController = m_viewController; Window.MakeKeyAndVisible(); m_view = Window.RootViewController.View; m_view.BackgroundColor = UIColor.White; AppCenter.Start("0d1f57c7-e260-4abf-8e71-c72ec6f2fffc", typeof(Analytics), typeof(Crashes)); AppCenter.LogLevel = LogLevel.Verbose; // Will execute the CSCS script: m_viewController.Run(); m_view.AutoresizingMask = UIViewAutoresizing.All; return(true); }