public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            SeparatelyShouldRefreshEndpoints = new List <bool> {
                true, true, true
            };

            PointsAndStatsButton.SetTitle("Points & Stats");
            LeaderboardButton.SetTitle("Leaderboard");
            TransactionsButton.SetTitle("Transactions");
            PointsAndStatsButton.SetSelected();

            UIStoryboard board = UIStoryboard.FromName("Main", null);

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

            pageViewController.DataSource = pageSource;

            var startVC         = this.ViewControllerAtIndex(1) as PointsBaseViewController; //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 = mainView.Bounds;
            AddChildViewController(this.pageViewController);
            mainView.AddSubview(this.pageViewController.View);
            pageViewController.DidMoveToParentViewController(this);

            CGRect frame = View.Frame;
        }
 public void ChangeSelectedButton(int page)
 {
     UpdateTabButtons();
     if (page == 0)
     {
         PointsAndStatsButton.SetSelected();
     }
     if (page == 1)
     {
         LeaderboardButton.SetSelected();
     }
     if (page == 2)
     {
         TransactionsButton.SetSelected();
     }
 }