Forum Xamarin.iOS


The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

Slide out menu

Jo.1765Jo.1765 USMember
edited June 2014 in Xamarin.iOS

Hi, i have an existing view controller and im trying to attach a 'slide out menu'. I am using the 'Flyout Navigation' component, i have put the code into the login page so if successful the view controller should contain the slide menu, but nothing appears?

**login page

` public void LoginSuccess()
if(this.scheduleTableViewController == null){
this.scheduleTableViewController = new ScheduleTableViewController();

        var rootNavigationController = new UINavigationController ();
        rootNavigationController.PushViewController (this.scheduleTableViewController, false);
        UIApplication.SharedApplication.Windows [0].RootViewController = rootNavigationController;



` public override void ViewDidLoad ()
base.ViewDidLoad ();

        if (ConfigurationManager.IsiPhone) {

            // Create the flyout view controller, make it large,
            // and add it as a subview:
            navigation = new FlyoutNavigationController ();
            navigation.Position = FlyOutNavigationPosition.Left;
            navigation.View.Frame = UIScreen.MainScreen.Bounds;
            View.AddSubview (navigation.View);
            this.AddChildViewController (navigation);

            // Create the menu:
            navigation.NavigationRoot = new RootElement ("Task List") {
                new Section ("Task List") {
                    from page in Tasks
                    select new StringElement (page) as Element

            // Create an array of UINavigationControllers that correspond to your
            // menu items:
            navigation.ViewControllers = Array.ConvertAll (Tasks, title =>
                new UINavigationController (new TaskPageController (navigation, title))



i have an set of strings to be used in the menu
string[] Tasks = { "Get Xamarin", "Learn C#", "Write Killer App", "Add Platforms", "Profit", "Meet Obama", };

any help would be great.

Sign In or Register to comment.