i want to call several Views in my Xamarin.ios App. This App hast an TabBarController, which works correctly. Now I want to call the Views, added to my TabBarController, with Buttons on the MainPage.
The way which the user should go should work like this:
I tried the following:
this.TabBarController.PresentViewController(this.TabBarController.ViewControllers[1], true, null);
and
TabBarController.SelectedIndex = 1;
PerformSegue("Einstellungen", sender: this.TabBarController);
but nothing worked. I just getting some Errors and the application crashes...
Can somebody give me a good idea?
To change the tabs of a UITabBarController all you have to do is change the current index.
this.TabBarController.SelectedIndex =*TabIndex*;
TabBarController is the reference of your UITabBarController object, Make sure that you are doing this over MainThread and things should work fine.
Please check this for more details https://learn.microsoft.com/en-us/xamarin/ios/user-interface/controls/creating-tabbed-applications
Feel free to get back if you have any queries