Ejemplo n.º 1
0
        // This method is invoked when the application has loaded its UI and its ready to run
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            window = new UIWindow(UIScreen.MainScreen.Bounds);

            tabBarController = new UITabBarController();

            viewController1 = new MapStuff.MapLineSharp.MapLinesViewController();
            viewController2 = new MapStuff.DrawMap.DrawGeometryMapViewController();


            viewController1.TabBarItem = new UITabBarItem("Show (OS3)", UIImage.FromFile("MapLineSharp/103-map.png"), 0);
            viewController2.TabBarItem = new UITabBarItem("Draw (OS3)", UIImage.FromFile("DrawMap/72-pin.png"), 0);

            var v = new Version(UIDevice.CurrentDevice.SystemVersion);

            if (v.Major >= 4)
            {                   // create & use the iOS4 stuff
                viewController3                  = new MapStuff.os4Maps.os4MapsViewController();
                viewController3.TabBarItem       = new UITabBarItem("Show (OS4)", UIImage.FromFile("os4Maps/tabmap.png"), 0);
                tabBarController.ViewControllers = new UIViewController[] { viewController1, viewController2, viewController3 };
            }
            else
            {                   // otherwise just iOS3
                tabBarController.ViewControllers = new UIViewController[] { viewController1, viewController2 };
            }
            window.AddSubview(tabBarController.View);
            window.MakeKeyAndVisible();
            return(true);
        }
Ejemplo n.º 2
0
        // This method is invoked when the application has loaded its UI and its ready to run
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            window = new UIWindow (UIScreen.MainScreen.Bounds);

            tabBarController = new UITabBarController();

            viewController1 = new MapStuff.MapLineSharp.MapLinesViewController();
            viewController2 = new MapStuff.DrawMap.DrawGeometryMapViewController();

            viewController1.TabBarItem = new UITabBarItem ("Show (OS3)", UIImage.FromFile("MapLineSharp/103-map.png"), 0);
            viewController2.TabBarItem = new UITabBarItem ("Draw (OS3)", UIImage.FromFile("DrawMap/72-pin.png"), 0);

            var v = new Version(UIDevice.CurrentDevice.SystemVersion);
            if (v.Major >= 4)
            {	// create & use the iOS4 stuff
                viewController3 = new MapStuff.os4Maps.os4MapsViewController();
                viewController3.TabBarItem = new UITabBarItem ("Show (OS4)", UIImage.FromFile("os4Maps/tabmap.png"), 0);
                tabBarController.ViewControllers = new UIViewController[] {viewController1, viewController2, viewController3};
            }
            else
            {	// otherwise just iOS3
                tabBarController.ViewControllers = new UIViewController[] {viewController1, viewController2};
            }
            window.AddSubview (tabBarController.View);
            window.MakeKeyAndVisible ();
            return true;
        }