(there is a 40k limit in posts, so... this is now plaintext)

James Clancey has done a basic version of it:

https://github.com/Clancey/FlyOutNavigation

I've not seen anything else, tho. But on the surface, it shouldn't be
too hard. Two views, one under the other. Trigger something (button)
and animate the top view away. Trigger something (gesture?) and
animate it back in.

I did a basic one, with a huge UIImageView as the background, and you
hit something, and it just scrolled over the show the left side.

so, assuming you have a 320x2 x 480 image (non-retina) as the
background view (BaseView), the button (trigger) just calls
SetInitialPage(0, true) for the left side, and 0,true for the right
side.

BaseView = new UIView(new RectangleF(new PointF(0,0),
Resources.Background.Size)); //Resources.Background is the big image!
baseView.BackgroundColor = Resources.MoleskineBackgroundColor; //it's
a color, but it's a pattern....
View.AddSubview(baseView);

//just add it into the View's view... this is all just in a UIViewController

public void TogglePage()
        {
            page = (page == 1) ? 0 : 1;

            SetInitialPage(page);
            sideButton.SetTitle((page == 1) ? "<<" : ">>",
UIControlState.Normal);
        }


        public override void SetInitialPage(int page, bool animate = true)
        {
            if (animate)
            {
                UIView.BeginAnimations("pagescroll");
                UIView.SetAnimationDuration(0.75f);
                UIView.SetAnimationCurve(UIViewAnimationCurve.EaseInOut);
            }

            if (page == 0)
            {
                var baseViewBounds = BaseView.Bounds;
                baseViewBounds.X = 0;
                BaseView.Bounds = baseViewBounds;

            } else {
                var baseViewBounds = BaseView.Bounds;
                baseViewBounds.X = BaseView.Bounds.Width - 320;
                BaseView.Bounds = baseViewBounds;
            }

            if (animate)
            {
                UIView.CommitAnimations();
            }
            base.SetInitialPage(page, animate);
        }
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to