Exemple #1
0
        public override void ViewDidLoad()
        {
            base.AreaCollectionOutlet       = AreaCollection;
            base.AreaCollectionHeightOutlet = AreaCollectionHeight;
            base.AreaCollectionTopOutlet    = cnsAreaCollectionTop;

            base.ViewDidLoad();

            ShouldDrillDownImmediately = true;

            var iv = new UIImageView(UIImage.FromBundle("more-bg.jpg"));

            iv.AddSubview(new UIView(iv.Bounds)
            {
                BackgroundColor = UIColor.FromRGBA(255, 255, 255, 128)
            });
            iv.ContentMode = UIViewContentMode.ScaleToFill;
            CollectionView.BackgroundView = iv;
            CollectionView.AddRefreshControl();
            AllRewardsButton.SetTitle("All Rewards");
            AvailableRewardsButton.SetTitle("Aviable");
            ClaimedButton.SetTitle("Claimed");

            // Perform any additional setup after loading the view, typically from a nib.
            CollectionView.RegisterNibForCell(RewardCollectionViewCell.Nib, RewardCollectionViewCell.ClassName);

            CheckToRegisterAppForRemoteNotifications();
        }
        //private bool _didReloadDataRewards;

        public override void ViewDidLoad()
        {
            tabBarView.Hidden               = true;
            base.AreaCollectionOutlet       = AreaCollection;
            base.AreaCollectionHeightOutlet = AreaCollectionHeight;

            base.ViewDidLoad();

            var iv = new UIImageView(UIImage.FromBundle("Background"));

            iv.ContentMode = UIViewContentMode.ScaleToFill;
            RewardsTableView.BackgroundView = iv;
            AllRewardsButton.SetTitle("All Rewards");
            AviableRewardsButton.SetTitle("Aviable");
            ClaimedButton.SetTitle("Claimed");

            // Perform any additional setup after loading the view, typically from a nib.
            RewardsTableView.SeparatorStyle = UITableViewCellSeparatorStyle.None;
            RewardsTableView.RegisterNibForCellReuse(MonthRewardsTableCell.Nib, MonthRewardsTableCell.Key);
            ChangeSelectedButton(CurrentPage);
        }
Exemple #3
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            tabBarView.Hidden = true;
            UIStoryboard board = UIStoryboard.FromName("Main", null);

            pageViewController = board.InstantiateViewController("PointsPageViewController") as UIPageViewController;
            pageSource         = new RewardsPageViewControllerDataSource(this);

            pageViewController.DataSource = pageSource;

            var startVC         = this.ViewControllerAtIndex(1) as RewardsBaseViewController; //start on second page for glitch (should start on page index 0 without glitch)
            var viewControllers = new UIViewController[] { startVC };

            pageViewController.SetViewControllers(viewControllers, UIPageViewControllerNavigationDirection.Forward, false, null);
            //pageViewController.View.Frame = new CGRect(0, 0, this.View.Frame.Width, this.View.Frame.Size.Height - 50);
            pageViewController.View.Frame = mainView.Frame;

            AddChildViewController(this.pageViewController);
            mainView.AddSubview(this.pageViewController.View);
            pageViewController.DidMoveToParentViewController(this);

            //startVC.ShowAreaCollection();
            //startVC.HideAreaCollection();
            //PrevPage();

            pageSource.ChangePage += (s, e) =>
            {
                var index = (int)s;
                ChangeSelectedButton(index);
            };
            AllRewardsButton.SetTitle("All Rewards");
            AviableRewardsButton.SetTitle("Aviable");
            ClaimedButton.SetTitle("Claimed");
            AllRewardsButton.SetSelected();
        }