Skip to content

[iOS] Shell Back Button Label  #8335

@jayambadkar

Description

@jayambadkar

Description

When using navigation pages with Shell-based navigation on an iOS .NET MAUI app, the back button label will set itself to the same as the page title if the title is short enough, otherwise it will do the expected behaviours (when page title is longer) and have a label of 'Back' (see images below).

I do not believe that this is intended behaviour as that would not make much sense. I should also add that this does not happen on Windows or on an Android emulator (12.0 - API 31), but I was unable to test the behaviour on MacCatalyst.

Steps to Reproduce

  1. Create a new dotnet MAUI project.
  2. Create the MainPage and another page, e.g. DemoPage, and register pages and routes on AppShell.xaml.cs
  3. Insert a button with command Shell.Current.GoToAsync(nameof(DemoPage)); on the MainPage
  4. Run the app on an iOS iPhone 15.5 simulator with Hot Reload enabled.
  5. Navigate to DemoPage
  6. Edit the title parameter in ContentPage there by making it longer and shorter to see the back button's unexpected behaviors on simulator live.

Alternatively clone this repo (https://github.com/ThatJammyDodger/iOSNav) and run it in iOS simulator, using the buttons to see what happens.

Results:
Short
Long

Dotnet version: 6.0.400-preview.22301.10

Version with bug

6.0.400 (current)

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

iOS 15.5

Did you find any workaround?

https://github.com/PureWeen/ShanedlerSamples/blob/main/ShanedlerSamples/Library/Workarounds/ShellWorkarounds.iOS.cs
Edit: Yes, see comment below

Relevant log output

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-controls-shellShell Navigation, Routes, Tabs, Flyoutarea-navigationNavigationPagefixed-in-8.0.0-preview.1.7762Look for this fix in 8.0.0-preview.1.7762!p/1Work that is important, and has been scheduled for release in this or an upcoming sprintplatform/ioss/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions