Exemplo n.º 1
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            // Perform any additional setup after loading the view
            pageViewController = new UIPageViewController(
                UIPageViewControllerTransitionStyle.Scroll,
                UIPageViewControllerNavigationOrientation.Horizontal);

            pageViewController.View.Frame = View.Bounds;
            View.AddSubviews(pageViewController.View);

            _courseManager = new CourseManager();
            _courseManager.MoveFirst();

            CourseViewController firstCourseViewController = CreateCourseViewController();

            pageViewController.SetViewControllers(new UIViewController[]
            {
                firstCourseViewController
            }, UIPageViewControllerNavigationDirection.Forward, false, null);

            pageViewController.GetNextViewController     = GetNextViewController;
            pageViewController.GetPreviousViewController = GetPreviousViewController;
        }
Exemplo n.º 2
0
        private CourseViewController CreateCourseViewController()
        {
            CourseViewController courseViewController = new CourseViewController();

            courseViewController.Course         = _courseManager.Current;
            courseViewController.CoursePosition = _courseManager.CurrentPosition;
            return(courseViewController);
        }
        CourseViewController CreateCourseViewController()
        {
            CourseViewController courseViewController = new CourseViewController();
            courseViewController.Course = courseManager.Current;
            courseViewController.CoursePosition = courseManager.CurrentPosition;

            return courseViewController;
        }
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            window = new UIWindow(UIScreen.MainScreen.Bounds);

            viewController            = new CourseViewController();
            window.RootViewController = viewController;

            window.MakeKeyAndVisible();

            return(true);
        }
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            window = new UIWindow(UIScreen.MainScreen.Bounds);

			viewController = new CourseViewController();
            window.RootViewController = viewController;

            window.MakeKeyAndVisible();

            return true;
        }
Exemplo n.º 6
0
        public UIViewController GetPreviousViewController(
            UIPageViewController pageViewController,
            UIViewController referenceViewController)
        {
            CourseViewController returnCourseViewController = null;
            var referenceCourseViewController = referenceViewController as CourseViewController;

            if (referenceCourseViewController == null)
            {
                return(null);
            }

            _courseManager.MoveTo(referenceCourseViewController.CoursePosition);
            if (_courseManager.CanMovePrev)
            {
                _courseManager.MovePrev();
                returnCourseViewController = CreateCourseViewController();
            }

            return(returnCourseViewController);
        }