Is it possible to change the actual ViewController on a UITabBarController in Monotouch

Published

I have a Monotouch App, on AppDelegate the RootViewController is a TabBarController, this TabBarController have 5 ViewControllers, lets say view1 to view5, I use

tabBarController.SelectedIndex = 2;

for select which viewController will load when the app starts it works and the default tabBar is view3, now I need to show another viewController, lets say from view1 change to view5 with code, its possible? there’s a way to emulate the clic on one of the buttons of my TabBar, that will work too…

UPDATE:

I tried:

view1.TabBarController.ViewControllers[4].PresentViewController(view5, true, delegate{});

And it works, but the view5 is presented over the TabBar, also I try this:

view1.TabBarController.TabBar.Items[4]. //I don't know which method could invoke the click

Where I select the item of the tabbar I want to click

I think the solution is close to this, the problem is that always the view5 shows over the TabBar and block it…

SOLVED:

view1.TabBarController.SelectedIndex = 2; //where the number is the view zero-based

Source: Xamarin.ios Questions

Published
Categorised as Uncategorised Tagged , ,

Answers

Leave a Reply

Your email address will not be published. Required fields are marked *

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq