-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[iOS] Fix Navigation Page BackButtonTitle Not Updating #31583
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[iOS] Fix Navigation Page BackButtonTitle Not Updating #31583
Conversation
|
Hey there @@devanathan-vaithiyanathan! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
|
/azp run MAUI-UITests-public |
|
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes an issue on iOS where the NavigationPage.BackButtonTitle property did not update at runtime without triggering other navigation-related changes. The fix ensures that changes to the BackButtonTitle property are immediately reflected in the UI.
- Adds runtime handling for BackButtonTitle property changes in iOS NavigationRenderer
- Includes comprehensive UI test coverage to verify the fix works correctly
- Follows the established pattern for handling navigation property changes
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/Controls/src/Core/Compatibility/Handlers/NavigationPage/iOS/NavigationRenderer.cs |
Adds BackButtonTitle property change handling to call UpdateBackButtonTitle method |
src/Controls/tests/TestCases.HostApp/Issues/Issue31539.cs |
Creates UI test page with buttons to test BackButtonTitle runtime updates |
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue31539.cs |
Implements NUnit test to verify BackButtonTitle updates correctly |
|
/azp run MAUI-UITests-public |
|
Azure Pipelines successfully started running 1 pipeline(s). |
* Update NavigationRenderer.cs * test case added * Update Issue31539.cs * snapshot added
* Update NavigationRenderer.cs * test case added * Update Issue31539.cs * snapshot added
* Update NavigationRenderer.cs * test case added * Update Issue31539.cs * snapshot added
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Issue Details
On iOS, NavigationPage.BackButtonTitle did not update at runtime until Apply TitleView or Set TitleIconImageSource was changed.
Description of Change
Added handling for BackButtonTitleProperty in HandleChildPropertyChanged, which calls UpdateBackButtonTitle(Child) to ensure the back button title updates at runtime.
Issues Fixed
Fixes #31539
Tested the behavior in the following platforms.
Before.mov
After.mov