Example #1
0
        private void ScrollToPage(nint pageNumber)
        {
            if (pageNumber < 0 || pageNumber >= pageControl.Pages)
            {
                return;
            }

            UIPageControl.AnimationsEnabled = true;
            UIPageControl.Animate(0.3d, delegate
            {
                scrollView.ContentOffset = new CGPoint(pageNumber * scrollView.Frame.Width, 0);
                pageControl.CurrentPage  = pageNumber;
            });
        }
Example #2
0
        private void ScrollToPage(nint page)
        {
            if (page < 0 || page >= pageControl.Pages)
            {
                return;
            }

            UIPageControl.AnimationsEnabled = true;
            UIPageControl.Animate(0.3d, delegate
            {
                scrollView.SetContentOffset(new CGPoint(0, scrollView.Frame.Height * page), false);
                pageControl.CurrentPage = page;
            }, delegate
            {
                // Show animation
                ShowOverlayAnimation();
            });
        }