public void PrevPage() { PointsBaseViewController current = pageViewController.ViewControllers[0] as PointsBaseViewController; var prev = pageViewController.DataSource.GetPreviousViewController(pageViewController, current); var viewControllers = new UIViewController[] { prev }; pageViewController.SetViewControllers(viewControllers, UIPageViewControllerNavigationDirection.Reverse, true, null); }
public void NextPage() { PointsBaseViewController current = pageViewController.ViewControllers[0] as PointsBaseViewController; var next = pageViewController.DataSource.GetNextViewController(pageViewController, current); var viewControllers = new UIViewController[] { next }; pageViewController.SetViewControllers(viewControllers, UIPageViewControllerNavigationDirection.Forward, true, null); next.View.LayoutSubviews(); }
public void SetSelectedPage(int pageIndex) { PointsBaseViewController current = pageViewController.ViewControllers[0] as PointsBaseViewController; var model = pageSource.SetSelectedPage(pageIndex, pageViewController, current); pageSource.SelectedIndex = -1; if (model == null) { return; } var viewControllers = new UIViewController[] { model.Controller }; pageViewController.SetViewControllers(viewControllers, model.Direction, true, null); }