That is awesome *Nic*! Thank you very much. Both that sample repo by James, and your extrapolation of the concept in sample code is a brilliant start for me.
Also - want to say it again - your webcast<http://blog.xamarin.com/2012/07/02/styling-your-ios-apps-seminar/>the other day was hugely helpful. A really really really great presentation. -- *Phil *Cockfield On Wed, Jul 4, 2012 at 6:57 AM, Nic Wise <[email protected]> wrote: > 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); } > > > > > On Wed, Jul 4, 2012 at 2:38 PM, Phil Cockfield <[email protected]> wrote: > >> I'm trying to do something akin to the emerging UI pattern of "side >> navigation" that you see in apps like *Facebook* and *Path*. >> >> This is where the root navigation options are shown via a bezel swipe >> from the left, which peels the main app view mostly off screen, leaving a >> hint of it still showing (say a 44px strip), with the navigation options >> presenting themselves as having been sitting "under" the screen. >> >> This pattern is detailed here: >> >> >> http://www.androiduipatterns.com/2012/06/emerging-ui-pattern-side-navigation.html >> >> How would I go about achieving something like this in MonoTouch? It >> seems like a significant variant from from the *UINavigationController*does. >> >> Thanks! >> -- >> *Phil *Cockfield >> >> >> >> >> _______________________________________________ >> MonoTouch mailing list >> [email protected] >> http://lists.ximian.com/mailman/listinfo/monotouch >> >> > > > -- > Nic Wise > t. +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise > b. http://www.fastchicken.co.nz/ > > Earnest: Self-employed? Track your business expenses and income. > http://earnestapp.com > Nearest Bus: find when the next bus is coming to your stop. > http://goo.gl/Vcz1p > mobileAgent (for FreeAgent): get your accounts in your pocket. > http://goo.gl/IuBU > Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa > London Bike App: Find the nearest Boris Bike, and get riding! > http://goo.gl/Icp2 > >
_______________________________________________ MonoTouch mailing list [email protected] http://lists.ximian.com/mailman/listinfo/monotouch
