public CategoryTableSource(Category[] items, Category[] filteredItems, CategoryScreen owner)
        {
            tableItems = items;
            this.filteredItems = filteredItems;

            this.categoryScreenController = owner;
            this.search = owner.SearchDisplayController;
        }
Beispiel #2
0
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            FileAccessHelper.GetFilePath("phrasebook.db3");

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

            phraseViewController = new CategoryScreen();
            informationViewController = new InformationScreen();
            iwaidjaInymanViewController = new IwaidjaInymanScreen ();

            //Phrase screen
            navigationController = new UINavigationController();
            navigationController.PushViewController(phraseViewController, true);

            navigationController.TabBarItem = new UITabBarItem ("Phrases", null, 0);
            UIImage phraseTabImage = UIImage.FromFile ("Images/Phrases");
            navigationController.TabBarItem.Image = scaleToSize (phraseTabImage, 30.0f, 30.0f);

            //Information screen
            informationNavigationController = new UINavigationController ();
            informationNavigationController.PushViewController (informationViewController, true);

            informationNavigationController.TabBarItem = new UITabBarItem ("Information", null, 1);
            UIImage informationTabImage = UIImage.FromFile ("Images/Information");
            informationNavigationController.TabBarItem.Image = scaleToSize (informationTabImage, 30.0f, 30.0f);

            //Iwaidja screen
            iwaidjaInymanNavigationController = new UINavigationController();
            iwaidjaInymanNavigationController.PushViewController (iwaidjaInymanViewController, true);

            iwaidjaInymanNavigationController.TabBarItem = new UITabBarItem ("Yagbani", null, 2);
            UIImage iwaidjaInymanTabImage = UIImage.FromFile ("Images/IwaidjaInyman");
            iwaidjaInymanNavigationController.TabBarItem.Image = scaleToSize (iwaidjaInymanTabImage, 30.0f, 30.0f);

            tabBarController = new UITabBarController ();
            tabBarController.ViewControllers = new UIViewController[] { navigationController, informationNavigationController, iwaidjaInymanNavigationController };
            tabBarController.TabBar.BarTintColor = UIColor.White;
            tabBarController.TabBar.TintColor = UIColor.White;
            tabBarController.TabBar.SelectionIndicatorImage = CreateImageFromColor (tabBarController.TabBar.Frame.Size.Height, tabBarController.TabBar.Frame.Size.Width);

            window.RootViewController = tabBarController;

            return true;
        }