예제 #1
0
        protected override void OnInit()
        {
            base.OnInit();

            ButtonController button = CreateItem(UIComponentManager.Components.button, UIContainerTag.Tag0);

            button.Text   = "назад";
            button.Click += () => HideShow <MainMenuScreen>();

            TextController title = CreateItem(UIComponentManager.Components.text, UIContainerTag.Tag3);

            title.Text = "сезончик";
            title.TextComponent.fontSize = 30;

            ButtonController leftButton = CreateItem(UIComponentManager.Components.button, UIContainerTag.Tag4);

            leftButton.Text   = "лево";
            leftButton.Click += UpdateLevelList;

            ButtonController rightButton = CreateItem(UIComponentManager.Components.button, UIContainerTag.Tag5);

            rightButton.Text   = "право";
            rightButton.Click += UpdateLevelList;

            _levelList = CreateItem(UIComponentManager.Components.collectionView, UIContainerTag.Tag1);
            UpdateLevelList();
            _levelList.CollectionGrouper.SetAsList(60f, 10f);
        }
예제 #2
0
        public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
        {
            Window = new UIWindow(UIScreen.MainScreen.Bounds);

            var layout = new UICollectionViewFlowLayout {
                ScrollDirection         = UICollectionViewScrollDirection.Vertical,
                MinimumInteritemSpacing = 10,
                MinimumLineSpacing      = 2,
                ItemSize = new CGSize(80, 120)
            };

            var controller           = new ViewController();
            var collectioncontroller = new CollectionViewController(layout);
            var tabbar = new UITabBarController();

            tabbar.ViewControllers = new UIViewController[] { controller, collectioncontroller };

            Window.RootViewController = tabbar;
            Window.MakeKeyAndVisible();

            return(true);
        }