FlyoutNavigation - iOS

I am trying to work with Clancey FlyoutNavigation, but I cannot get it to execute segue.

I want it to work as a navigation menu, so if I click on "Start", it will go to a specific view on my storyboard

here is my current code but it doesn't work at all.

var navigation = new FlyoutNavigationController { // Create the navigation menu NavigationRoot = new RootElement ("Navigation") { new Section ("Pages") { new StringElement ("Start"), } }, // Supply view controllers corresponding to menu items: ViewControllers = new [] { new UIViewController { this.PerformSegue("toError", this) }, }, }; // Show the navigation view navigation.ToggleMenu (); View.AddSubview (navigation.View); 
+6
source share
1 answer

I don’t know if you need help with this question because this question was asked last year, but I created a custom menu controller that inherited "FlyoutNavigationController". Thus, it was really easy to add new instances of the menu that I would like to switch from any kind. The way I encoded my custom menu was as follows:

First I created new instances of the menu in which I would like to go to:

 UINavigationController planningViewController = new UINavigationController(new PlanningViewController()); 

Then I added them to the array:

 UIViewController[] viewcontrollers = new [] { planningViewController }; 

Then I added them to RootElement:

 NavigationRoot = new RootElement ("Planning") { new Section ("Menu") { new StringElement ("Rooster"), }, }; 

The rest of the code is to add delegates to click on menu items. I use a separate FlyOutDataSource file to control the menu that the program should follow, but this can be done in the same class where you declare your menu. You can use the clicked element index to determine which menu should go to.

+2
source

Source: https://habr.com/ru/post/959335/


All Articles