Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

Toggle iOS NavigationPage.SetHasNavigationBar with TabbedPage results in hiding the tabs

$
0
0

Anyone tried this scenario before? I'm talking about latest Xamarin forms 2 targetting iOS.

I have a TabbedPage with 4 tabs, when the user looks at the first 2, there should not be a navigationbar - I got this working by setting the NavigationPage.SetHasNavigationBar(this, false) in the constructor of the TabbedPage.

Now by using the ExtendedTabbedPage of Xamarin forms labs, I can hook up to the change tab event called OnCurrentPageChanged() and in here I verify if I'm on one of the last 2 tabs and toggle the NavigationPage.SetHasNavigationBar(this, true).

This actually works great, except for 1 small detail. When the navigation bar gets shown, tab page shifts down and it hides the tabs at the bottom, so the user is unable to switch tabs at that moment.

When I set NavigationPage.SetHasNavigationBar(this, true) in the constructor of the tabbedpage and leave it for all tabs, the result is ok. Meaning I get a navigationheader and tabs visible on each tab.


Viewing all articles
Browse latest Browse all 77050

Trending Articles