Example #1
0
        public void Setup <TPage, TContainer>(ITheme <TPage, TContainer> theme) where TPage : IPage where TContainer : IContainer
        {
            walkthrough = theme.Container as BWWalkthroughViewController;

            foreach (var page in theme.Pages)
            {
                var uiPage = page as UIViewController;
                uiPage.View.Bounds = UIScreen.MainScreen.Bounds;
                uiPage.View.SetNeedsLayout();
                uiPage.View.LayoutIfNeeded();

                walkthrough.AddViewController(uiPage);
            }

            IsInitialized = true;
        }
        public void ShowWalkthrough()
        {
            // Get view controllers and build the walkthrough
            var stb = UIStoryboard.FromName("Walkthrough", null);

            walkthrough = stb.InstantiateViewController("walk") as BWWalkthroughViewController;
            var page_zero  = stb.InstantiateViewController("walk0");
            var page_one   = stb.InstantiateViewController("walk1");
            var page_two   = stb.InstantiateViewController("walk2");
            var page_three = stb.InstantiateViewController("walk3");

            // Attach the pages to the master
            walkthrough.walkDelegate = this;

            walkthrough.AddViewController(page_one);
            walkthrough.AddViewController(page_two);
            walkthrough.AddViewController(page_three);
            walkthrough.AddViewController(page_zero);

            walkthrough.CurrentPage = 2;

            this.PresentViewController(walkthrough, true, null);
        }