Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
C#
branch: master

Merge branch 'dialog'

Conflicts:
	FlyoutNavigation.sln
	FlyoutNavigation/FlyoutNavigationController.cs
latest commit 50670be1e9
@Clancey authored

README.md

The FlyoutNavigationController presents a simple navigation view that appears to slide out from underneath a main view, allowing you to navigate among a list of view controllers. The same view also functions as a UISplitViewController on the iPad.

using FlyoutNavigation;
using MonoTouch.Dialog;
...
public override void ViewDidLoad ()
{
    base.ViewDidLoad ();
    var navigation = new FlyoutNavigationController {
        // Create the navigation menu
        NavigationRoot = new RootElement ("Navigation") {
            new Section ("Pages") {
                new StringElement ("Animals"),
                new StringElement ("Vegetables"),
                new StringElement ("Minerals"),
            }
        },
        // Supply view controllers corresponding to menu items:
        ViewControllers = new [] {
            new UIViewController { View = new UILabel { Text = "Animals (drag right)" } },
            new UIViewController { View = new UILabel { Text = "Vegetables (drag right)" } },
            new UIViewController { View = new UILabel { Text = "Minerals (drag right)" } },
        },
    };
    // Specify navigation position
    navigation.Position = FlyOutNavigationPosition.Left;
    // Show the navigation view
    navigation.ToggleMenu ();
    View.AddSubview (navigation.View);
}
Something went wrong with that request. Please try again.