maui icon indicating copy to clipboard operation
maui copied to clipboard

[regression/8.0.3] Shell.NavBarIsVisible is not working on iOS

Open ka4ep opened this issue 1 year ago • 3 comments
trafficstars

Description

I have a shell page with defined Shell.NavBarIsVisible="false". When I was using .NET 7.0.101, the bar with the 'hamburger' button is hidden on both Android and iOS. After upgrading from MAUI 7.0.101 to 8.0.3, the bar is still visible on iOS. It's hidden on Android as expected.

Steps to Reproduce

  1. Create a new MAUI app from template and choose framework .NET7 or .NET8.
  2. In the AppShell.xaml <Shell /> tag add lines: Shell.FlyoutBehavior="Flyout" Shell.NavBarIsVisible="False"
  3. Compile and run on Android/iOS device or simulator.
  4. On iOS .NET 8, the navigation bar is visible, even when stated otherwise.

Link to public reproduction project repository

https://github.com/ka4ep/Maui.NavBar.Repro

Version with bug

8.0.3

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

7.0.101

Affected platforms

iOS

Affected platform versions

iOS 15-17

Did you find any workaround?

No response

Relevant log output

Relevant .log files are in GitHub repository.

ka4ep avatar Nov 22 '23 10:11 ka4ep

Verified this on Visual Studio Enterprise 17.9.0 Preview 2(8.0.3). Repro on iOS 17.0, MacCatalyst and Windows 11, not repro on Android 14.0-API34 with below Project: NavBar8.zip

XamlTest avatar Dec 26 '23 09:12 XamlTest

So I assume this is getting fixed?

jbfranklin avatar Jan 10 '24 07:01 jbfranklin

We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.

ghost avatar Jan 10 '24 16:01 ghost

Hello, I see that @jsuarezruiz created a pull request that fix the issue. When this will be release?

I am working on a migration from Xamarin to MAUI and my customer is waiting for this bug fix to release the app on the stores. Having this ugly navigation bar displayed with no possibility to hide it is a strong impediment. By the way, I have the bug on both Android and iOS.

Please, send some update that I can communicate to my customer.

Many thanks.

KevinJalais avatar Feb 02 '24 14:02 KevinJalais

Any update on when this is planned to be fixed? It's still there on version 8.0.6 and I cannot see a fix for 8.0.7. It's a blocking point for us! Any workaround you can suggest?

johannes-steurer avatar Feb 15 '24 07:02 johannes-steurer

@johannes-steurer, on my side, the problem has been resolved with version 8.0.7. If you use a NavigationPage you can set NavigationPage.SetHasNavigationBar(this, false); in your code behind (.xaml.cs file).

I acknowledge that it has not been resolved for Shell component, but as long as I use NavigationPage it's temporary satisfying.

KevinJalais avatar Feb 15 '24 08:02 KevinJalais

@KevinJalais thanks for the quick feedback. as I use Shell the workaround does not work for me.

johannes-steurer avatar Feb 15 '24 10:02 johannes-steurer

Has there been any update on this? I see the PR is still open. This is a blocker for us as we use Shell navigation and the workaround doesn't work for us.

JakodeWet avatar Mar 04 '24 06:03 JakodeWet

We have the same issue

Ok, so we found a workaround. You can add the Shell.NavBarIsVisible=False property to your actual page and not the Shell itself. If you have a ContentBasePage, adding it there also works. Currently we have it on our ContentBasePage and not in the Shell itself and its working.

JakodeWet avatar Mar 05 '24 09:03 JakodeWet

The suggestion that @JakodeWet made worked for me. It seems like a very fundamental thing that should have been fixed by now

medarke avatar Jun 04 '24 12:06 medarke

You can write a handler for iOS to solve this problem.

MauiProgram.cs image

Platforms/iOS/AppShell.cs image

msrockswell avatar Jun 04 '24 13:06 msrockswell