Наследование: UITabBarController
Пример #1
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            window           = new UIWindow(UIScreen.MainScreen.Bounds);
            tabBarController = new PBTabBarController();

            var prayers      = new UINavigationController(new PrayersViewController());
            var verses       = new UINavigationController(new VersesViewController());
            var memorization = new UINavigationController(new MemorizationViewController());

            var prayersItem = new UITabBarItem();

            prayersItem.Image = UIImage.FromFile("Images/Tabs/Prayers.png");
            var versesItem = new UITabBarItem();

            versesItem.Image = UIImage.FromFile("Images/Tabs/Verses.png");
            var memorizationItem = new UITabBarItem();

            memorizationItem.Image = UIImage.FromFile("Images/Tabs/Memorization.png");

            verses.TabBarItem       = versesItem;
            prayers.TabBarItem      = prayersItem;
            memorization.TabBarItem = memorizationItem;

            tabBarController.ViewControllers = new UIViewController[] {
                prayers,
                verses,
                memorization
            };
            tabBarController.TabBar.BackgroundImage = Images.TabBarBackground;
            tabBarController.SelectedIndex          = 1;

            ConfigureDatabase();
            ConfigureAppearanceSettings();
            ConfigureThirdPartyLibraries();
            ConfigureiRate();

            window.RootViewController = tabBarController;
            window.MakeKeyAndVisible();

            UIApplication.SharedApplication.RegisterForRemoteNotificationTypes(UIRemoteNotificationType.Alert | UIRemoteNotificationType.Badge
                                                                               | UIRemoteNotificationType.Sound);
            app.SetStatusBarStyle(UIStatusBarStyle.LightContent, true);

            return(true);
        }
Пример #2
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            Current          = this;
            TabBarController = new PBTabBarController();

            window = new UIWindow(UIScreen.MainScreen.Bounds);

            ConfigureDatabase();
            ConfigureAppearanceSettings();
            ConfigureThirdPartyLibraries();
            ConfigureiRate();

            var verses       = new UINavigationController(new VersesTableViewController());
            var memorization = new UINavigationController(new MemorizationViewController());

            var versesItem = new UITabBarItem {
                Image = UIImage.FromFile(Images.VersesTab)
            };
            var memorizationItem = new UITabBarItem {
                Image = UIImage.FromFile(Images.MemorizationTab)
            };

            verses.TabBarItem       = versesItem;
            memorization.TabBarItem = memorizationItem;

            TabBarController.ViewControllers = new UIViewController[] {
                verses,
                memorization
            };
            TabBarController.TabBar.BackgroundImage = UIImage.FromFile(Images.TabBarBackground);

            window.RootViewController = TabBarController;
            window.MakeKeyAndVisible();

            UIApplication.SharedApplication.RegisterForRemoteNotificationTypes(UIRemoteNotificationType.Alert | UIRemoteNotificationType.Badge
                                                                               | UIRemoteNotificationType.Sound);
            app.SetStatusBarStyle(UIStatusBarStyle.LightContent, true);

            return(true);
        }
Пример #3
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            Current = this;
            TabBarController = new PBTabBarController ();

            window = new UIWindow (UIScreen.MainScreen.Bounds);

            ConfigureDatabase ();
            ConfigureAppearanceSettings ();
            ConfigureThirdPartyLibraries ();
            ConfigureiRate ();

            var verses = new UINavigationController (new VersesTableViewController ());
            var memorization = new UINavigationController (new MemorizationViewController ());

            var versesItem = new UITabBarItem { Image = UIImage.FromFile (Images.VersesTab) };
            var memorizationItem = new UITabBarItem { Image = UIImage.FromFile (Images.MemorizationTab) };

            verses.TabBarItem = versesItem;
            memorization.TabBarItem = memorizationItem;

            TabBarController.ViewControllers = new UIViewController[] {
                verses,
                memorization
            };
            TabBarController.TabBar.BackgroundImage = UIImage.FromFile (Images.TabBarBackground);

            window.RootViewController = TabBarController;
            window.MakeKeyAndVisible ();

            UIApplication.SharedApplication.RegisterForRemoteNotificationTypes (UIRemoteNotificationType.Alert | UIRemoteNotificationType.Badge
                | UIRemoteNotificationType.Sound);
            app.SetStatusBarStyle (UIStatusBarStyle.LightContent, true);

            return true;
        }