Exemple #1
0
 private void AddTutorial4()
 {
     tutorialView4       = new TutorialSubview(scrollView.Frame);
     tutorialView4.Frame = new CGRect(0, scrollView.Frame.Height * 4, scrollView.Frame.Width, scrollView.Frame.Height);
     tutorialView4.AddOverlay1();
     scrollView.AddSubview(tutorialView4);
 }
Exemple #2
0
        private void AddTutorial0()
        {
            // tutorialView0
            tutorialView0 = new TutorialSubview(scrollView.Frame);

            // Swipe button
            UIImage bgImage = UIImage.FromBundle("Assets/Tutorial/circleButton_large.png");

            tutorialView0.AddLargeButton(bgImage);
            tutorialView0.Button.Frame          = new CGRect(scrollView.Center.X - (bgImage.Size.Width / 2), 615, bgImage.Size.Width, bgImage.Size.Height);
            tutorialView0.Button.TouchUpInside += delegate
            {
                ScrollToPage(1);
            };
            scrollView.AddSubview(tutorialView0);

            // Flash animation
            ToggleArrow(tutorialView0.Button.ImageView);
        }
Exemple #3
0
        private void AddTutorial3()
        {
            tutorialView3       = new TutorialSubview(scrollView.Frame);
            tutorialView3.Frame = new CGRect(0, scrollView.Frame.Height * 3, scrollView.Frame.Width, scrollView.Frame.Height);
            tutorialView3.AddOverlay1();
            tutorialView3.AddOverlay2();

            // Swipe button
            UIImage bgImage = UIImage.FromBundle("Assets/Tutorial/circleButton_small.png");

            tutorialView3.AddSmallButton(bgImage);
            tutorialView3.Button.Frame          = new CGRect(scrollView.Center.X - (bgImage.Size.Width / 2), scrollView.Frame.Bottom - 240f, bgImage.Size.Width, bgImage.Size.Height);
            tutorialView3.Button.TouchUpInside += delegate
            {
                ScrollToPage(4);
            };
            scrollView.AddSubview(tutorialView3);

            // Flash animation
            ToggleArrow(tutorialView3.Button.ImageView);
        }
Exemple #4
0
        public void UpdateImages()
        {
            // panel
            panel.Image = UIImage.FromBundle("Assets/Tutorial/" + orientationStr + "/panel.png");
            panel.Frame = scrollView.Frame;

            // tutorialView0
            tutorialView0.Background.Image = UIImage.FromBundle("Assets/Tutorial/" + orientationStr + "/tutorial_0.png");

            // tutorialView1
            tutorialView1.Background.Image = UIImage.FromBundle("Assets/Tutorial/" + orientationStr + "/tutorial_1.png");
            tutorialView1.Overlay1.Image   = UIImage.FromBundle("Assets/Tutorial/" + orientationStr + "/tutorial_1_0.png");
            tutorialView1.Overlay2.Image   = UIImage.FromBundle("Assets/Tutorial/" + orientationStr + "/tutorial_1_1.png");
            tutorialView1.Button.Frame     = new CGRect(scrollView.Center.X - (tutorialView1.Button.Frame.Width / 2), scrollView.Frame.Bottom - 240f, tutorialView1.Button.Frame.Width, tutorialView1.Button.Frame.Height);

            // tutorialView2
            tutorialView2.Background.Image = UIImage.FromBundle("Assets/Tutorial/" + orientationStr + "/tutorial_2.png");
            tutorialView2.Overlay1.Image   = UIImage.FromBundle("Assets/Tutorial/" + orientationStr + "/tutorial_2_0.png");
            tutorialView2.Overlay2.Image   = UIImage.FromBundle("Assets/Tutorial/" + orientationStr + "/tutorial_2_1.png");
            tutorialView2.Button.Frame     = tutorialView1.Button.Frame;

            // tutorialView3
            tutorialView3.Background.Image = UIImage.FromBundle("Assets/Tutorial/" + orientationStr + "/tutorial_3.png");
            tutorialView3.Overlay1.Image   = UIImage.FromBundle("Assets/Tutorial/" + orientationStr + "/tutorial_3_0.png");
            tutorialView3.Overlay2.Image   = UIImage.FromBundle("Assets/Tutorial/" + orientationStr + "/tutorial_3_1.png");
            tutorialView3.Button.Frame     = tutorialView1.Button.Frame;

            // tutorialView4
            tutorialView4.Background.Image = UIImage.FromBundle("Assets/Tutorial/" + orientationStr + "/tutorial_4.png");
            tutorialView4.Overlay1.Image   = UIImage.FromBundle("Assets/Tutorial/" + orientationStr + "/tutorial_4_0.png");

            if (orientationStr == StringRef.Portrait)
            {
                closeButton.Frame          = new CGRect(this.View.Frame.Width - closeButton.Frame.Width, 641.5f, closeButton.Frame.Width, closeButton.Frame.Height);
                tutorialView0.Button.Frame = new CGRect(scrollView.Center.X - (tutorialView0.Button.Frame.Width / 2), 615f, tutorialView0.Button.Frame.Width, tutorialView0.Button.Frame.Height);
                slider1.Frame = new CGRect(this.View.Frame.Width - slider1.Frame.Width, 400f, slider1.Frame.Width, slider1.Frame.Height);
            }
            else
            {
                closeButton.Frame          = new CGRect(this.View.Frame.Width - closeButton.Frame.Width, 513.5f, closeButton.Frame.Width, closeButton.Frame.Height);
                tutorialView0.Button.Frame = new CGRect(scrollView.Center.X - (tutorialView0.Button.Frame.Width / 2), scrollView.Frame.Bottom - 280f, tutorialView0.Button.Frame.Width, tutorialView0.Button.Frame.Height);
                slider1.Frame = new CGRect(this.View.Frame.Width - slider1.Frame.Width, 274f, slider1.Frame.Width, slider1.Frame.Height);
            }

            // slider
            slider2.Frame = new CGRect(slider1.Frame.X, slider1.Frame.Bottom, slider1.Frame.Width, slider1.Frame.Height);
            slider3.Frame = new CGRect(slider1.Frame.X, slider2.Frame.Bottom, slider1.Frame.Width, slider1.Frame.Height);
            slider4.Frame = new CGRect(slider1.Frame.X, slider3.Frame.Bottom, slider1.Frame.Width, slider1.Frame.Height);

            // Update tutorialView frame so that it fits the updated paging size
            int i = 0;

            foreach (UIView subview in scrollView)
            {
                if (subview is TutorialSubview)
                {
                    TutorialSubview tutorialView = subview as TutorialSubview;
                    tutorialView.Frame = new CGRect(0, scrollView.Frame.Height * i, scrollView.Frame.Width, scrollView.Frame.Height);

                    i++;
                }
            }

            UpdateSliderIndicatorFrame();

            scrollView.ContentOffset = new CGPoint(0, pageControl.CurrentPage * scrollView.Frame.Height);
            scrollView.ContentSize   = new CGSize(scrollView.Frame.Width, scrollView.Frame.Height * 5);
        }